summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-12-23 03:13:00 +0100
committerwm4 <nfxjfg@googlemail.com>2017-12-26 02:56:09 +0100
commitcf57cb3ae4364ab8e70af37beea7a45a86de90e9 (patch)
tree2c4e657c46b7a54dc175611d173a4dff9f742572
parent4ed66517c62c599701b3793fa2843d5a8530a4f4 (diff)
downloadffmpeg-streaming-cf57cb3ae4364ab8e70af37beea7a45a86de90e9.zip
ffmpeg-streaming-cf57cb3ae4364ab8e70af37beea7a45a86de90e9.tar.gz
h264: add AVOption to set x264_build default
This provides a generic way to the API user to deal with files that either lack this SEI, or which have the SEI only in packets not passed to the decoder (such as the common case of the SEI being in the very firsat video packet, but decoding is started somewhere in the middle of the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this somewhat of a necessity. This intentionally uses the version in the SEI instead, if any is found.
-rw-r--r--libavcodec/h264dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 1e98765..8c9c6d9 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->flags = avctx->flags;
h->poc.prev_poc_msb = 1 << 16;
h->recovery_frame = -1;
- h->x264_build = -1;
h->frame_recovered = 0;
h->poc.prev_frame_num = -1;
h->sei.frame_packing.arrangement_cancel_flag = -1;
@@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
{ "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0 },
{ "nal_length_size", "nal_length_size", OFFSET(nal_length_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
{ "enable_er", "Enable error resilience on damaged frames (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
+ { "x264_build", "Assume this x264 version if no x264 version found in any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VD },
{ NULL },
};
OpenPOWER on IntegriCloud