My sample with a 256 frame or so gap doesn't work with 
ff_delayed_release_buffer otherwise.
No change on MR3_TANDBERG_B.264.
---
 libavcodec/h264.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index fb796dd..7ed058a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3974,6 +3974,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
     h->mb_field_decoding_flag= s->picture_structure != PICT_FRAME;
 
     if(h0->current_slice == 0){
+        if((h->prev_frame_num+1)%(1<<h->sps.log2_max_frame_num) < (h->frame_num - h->sps.ref_frame_count))
+            h->prev_frame_num = h->frame_num - h->sps.ref_frame_count - 1;
+
         while(h->frame_num !=  h->prev_frame_num &&
               h->frame_num != (h->prev_frame_num+1)%(1<<h->sps.log2_max_frame_num)){
             av_log(NULL, AV_LOG_DEBUG, "Frame num gap %d %d\n", h->frame_num, h->prev_frame_num);
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to