Browse Source

h264: do not discard NAL_SEI when skipping frames

Setting AVDISCARD_NONREF (e.g. after flushing) resulted in 100% dropped frames.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n2.1
Rainer Hochecker Anton Khirnov 12 years ago
parent
commit
71cabb521a
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/h264.c

+ 3
- 2
libavcodec/h264.c View File

@@ -4547,8 +4547,9 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
continue;
}

// FIXME do not discard SEI id
if (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)
if (avctx->skip_frame >= AVDISCARD_NONREF &&
h->nal_ref_idc == 0 &&
h->nal_unit_type != NAL_SEI)
continue;

again:


Loading…
Cancel
Save