Commit fb4ca2cb authored by Josh Allmann's avatar Josh Allmann Committed by Martin Storsjö

rtpdec: Clean up FMTP parsing code in H.264 RTP depacketizer

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23850 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1ed3cef5
...@@ -385,20 +385,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index, ...@@ -385,20 +385,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
codec->height = atoi(p + 1); // skip the - codec->height = atoi(p + 1); // skip the -
codec->pix_fmt = PIX_FMT_YUV420P; codec->pix_fmt = PIX_FMT_YUV420P;
} else if (av_strstart(p, "fmtp:", &p)) { } else if (av_strstart(p, "fmtp:", &p)) {
char attr[256]; return ff_parse_fmtp(stream, h264_data, p, sdp_parse_fmtp_config_h264);
char value[4096];
// remove the protocol identifier..
while (*p && *p == ' ') p++; // strip spaces.
while (*p && *p != ' ') p++; // eat protocol identifier
while (*p && *p == ' ') p++; // strip trailing spaces.
/* loop on each attribute */
while (ff_rtsp_next_attr_and_value
(&p, attr, sizeof(attr), value, sizeof(value))) {
/* grab the codec extra_data from the config parameter of the fmtp line */
sdp_parse_fmtp_config_h264(stream, h264_data, attr, value);
}
} else if (av_strstart(p, "cliprect:", &p)) { } else if (av_strstart(p, "cliprect:", &p)) {
// could use this if we wanted. // could use this if we wanted.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment