Skip to content

Instantly share code, notes, and snippets.

@hex128
Last active July 30, 2016 17:25
Show Gist options
  • Save hex128/342f2e2f03106c65ca27 to your computer and use it in GitHub Desktop.
Save hex128/342f2e2f03106c65ca27 to your computer and use it in GitHub Desktop.
Ignore invalid sprop-parameter-sets
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -168,6 +168,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
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,
&codec->extradata_size, value);
av_log(s, AV_LOG_DEBUG, "Extradata set to %p (size: %d)\n",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment