MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_parse_fmtp

Function ff_parse_fmtp

libavformat/rtpdec.c:946–982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946int ff_parse_fmtp(AVFormatContext *s,
947 AVStream *stream, PayloadContext *data, const char *p,
948 int (*parse_fmtp)(AVFormatContext *s,
949 AVStream *stream,
950 PayloadContext *data,
951 const char *attr, const char *value))
952{
953 char attr[256];
954 char *value;
955 int res;
956 int value_size = strlen(p) + 1;
957
958 if (!(value = av_malloc(value_size))) {
959 av_log(s, AV_LOG_ERROR, "Failed to allocate data for FMTP.\n");
960 return AVERROR(ENOMEM);
961 }
962
963 // remove protocol identifier
964 while (*p && *p == ' ')
965 p++; // strip spaces
966 while (*p && *p != ' ')
967 p++; // eat protocol identifier
968 while (*p && *p == ' ')
969 p++; // strip trailing spaces
970
971 while (ff_rtsp_next_attr_and_value(&p,
972 attr, sizeof(attr),
973 value, value_size)) {
974 res = parse_fmtp(s, stream, data, attr, value);
975 if (res < 0 && res != AVERROR_PATCHWELCOME) {
976 av_free(value);
977 return res;
978 }
979 }
980 av_free(value);
981 return 0;
982}
983
984int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx)
985{

Callers 11

xiph_parse_sdp_lineFunction · 0.85
parse_sdp_lineFunction · 0.85
latm_parse_sdp_lineFunction · 0.85
opus_parse_sdp_lineFunction · 0.85
ilbc_parse_sdp_lineFunction · 0.85
hevc_parse_sdp_lineFunction · 0.85
dv_parse_sdp_lineFunction · 0.85
rfc4175_parse_sdp_lineFunction · 0.85
parse_av1_sdp_lineFunction · 0.85
parse_h264_sdp_lineFunction · 0.85
amr_parse_sdp_lineFunction · 0.85

Calls 5

av_logFunction · 0.85
parse_fmtpFunction · 0.70
av_mallocFunction · 0.50
av_freeFunction · 0.50

Tested by

no test coverage detected