[FFmpeg-devel] [PATCH]Issue 1930

Carl Eugen Hoyos cehoyos
Tue May 25 15:12:33 CEST 2010


Issue 1930 links to a sample that is a transport stream recorded from Astra 
Promo showing a 3D (side-by-side) test stream (actually two: First Astra logo 
in 3D, then an animation). The animation part of the test stream cannot be 
decoded by current FFmpeg (regression since 16300). It decodes fine with 
version 17.1 of the reference decoder (but not 15.1).

Attached patch fixes the issue, afaict, since this is a real-world stream, it 
should be applied even if the stream is not standard-compliant.

Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/h264_ps.c
--- libavcodec/h264_ps.c	(revision 23308)
+++ libavcodec/h264_ps.c	(working copy)
@@ -272,7 +272,7 @@
     get_bits1(&s->gb);   //constraint_set3_flag
     get_bits(&s->gb, 4); // reserved
     level_idc= get_bits(&s->gb, 8);
-    sps_id= get_ue_golomb_31(&s->gb);
+    sps_id= get_ue_golomb(&s->gb);
     if(sps_id >= MAX_SPS_COUNT) {
         av_log(h->s.avctx, AV_LOG_ERROR, "sps_id (%d) out of range\n", sps_id);
@@ -427,7 +427,7 @@
     pps= av_mallocz(sizeof(PPS));
     if(pps == NULL)
         return -1;
-    pps->sps_id= get_ue_golomb_31(&s->gb);
+    pps->sps_id= get_ue_golomb(&s->gb);
     if((unsigned)pps->sps_id>=MAX_SPS_COUNT || h->sps_buffers[pps->sps_id] == NULL){
         av_log(h->s.avctx, AV_LOG_ERROR, "sps_id out of range\n");
         goto fail;

More information about the ffmpeg-devel mailing list