Skip to content
This repository
Browse code

Merge pull request #3208 from FernetMenta/audiostream

dvdplayer: fix accurate seek
  • Loading branch information...
commit 1b5ed564898caaf5849bc1577af2404bbf45e4ea 2 parents ba5e5e5 + e1c11b9
Rainer Hochecker authored September 10, 2013
3  lib/ffmpeg/libavcodec/h264.c
@@ -4523,8 +4523,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
4523 4523
                     first_slice = hx->nal_unit_type;
4524 4524
                 }
4525 4525
 
4526  
-            // FIXME do not discard SEI id
4527  
-            if (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)
  4526
+            if (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0 && h->nal_unit_type != NAL_SEI)
4528 4527
                 continue;
4529 4528
 
4530 4529
 again:
14  lib/ffmpeg/patches/0056-backport-h264-do-not-discard-NAL_SEI-when-skipping-frames.patch
... ...
@@ -0,0 +1,14 @@
  1
+diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c
  2
+index 85f2372..1cab49f 100644
  3
+--- a/lib/ffmpeg/libavcodec/h264.c
  4
++++ b/lib/ffmpeg/libavcodec/h264.c
  5
+@@ -4523,8 +4523,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
  6
+                     first_slice = hx->nal_unit_type;
  7
+                 }
  8
+ 
  9
+-            // FIXME do not discard SEI id
  10
+-            if (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)
  11
++            if (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0 && h->nal_unit_type != NAL_SEI)
  12
+                 continue;
  13
+ 
  14
+ again:

0 notes on commit 1b5ed56

Please sign in to comment.
Something went wrong with that request. Please try again.