summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorJosh Allmann <joshua.allmann@gmail.com>2010-06-28 11:28:02 +0000
committerMartin Storsjö <martin@martin.st>2010-06-28 11:28:02 +0000
commitfb4ca2cb51f99dfa658d5fc4f082d18423172f38 (patch)
tree29de0426cffb29dd0eb1a600facab133e4765fb7 /libavformat
parent1ed3cef51346ce42953fd755a2abcace839ab834 (diff)
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
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtpdec_h264.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index ef42874f10..06e30ab953 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -385,20 +385,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
codec->height = atoi(p + 1); // skip the -
codec->pix_fmt = PIX_FMT_YUV420P;
} else if (av_strstart(p, "fmtp:", &p)) {
- char attr[256];
- 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);
- }
+ return ff_parse_fmtp(stream, h264_data, p, sdp_parse_fmtp_config_h264);
} else if (av_strstart(p, "cliprect:", &p)) {
// could use this if we wanted.
}