avformat/rtpdec_h264: Ignore invalid sprop-parameter-sets missing PPS
authorAndrew Shulgin <andrewshulginua@gmail.com>
Sat, 27 Feb 2016 19:32:53 +0000 (21:32 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Mar 2016 01:19:23 +0000 (02:19 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/rtpdec_h264.c

index b399be4..e707d03 100644 (file)
@@ -166,6 +166,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
             parse_profile_level_id(s, h264_data, value);
     } else if (!strcmp(attr, "sprop-parameter-sets")) {
         int ret;
+        if (value[strlen(value) - 1] == ',') {
+            av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n");
+            return 0;
+        }
         codec->extradata_size = 0;
         av_freep(&codec->extradata);
         ret = ff_h264_parse_sprop_parameter_sets(s, &codec->extradata,