changeset 6190:8ee715d46f99 libavformat

rtpdec: Clean up FMTP parsing code in H.264 RTP depacketizer Patch by Josh Allmann, joshua dot allmann at gmail
author mstorsjo
date Mon, 28 Jun 2010 11:28:02 +0000
parents ed6c50412998
children 7884ec350d88
files rtpdec_h264.c
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/rtpdec_h264.c	Mon Jun 28 11:26:29 2010 +0000
+++ b/rtpdec_h264.c	Mon Jun 28 11:28:02 2010 +0000
@@ -385,20 +385,7 @@
         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.
     }