diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-05-07 13:28:31 +0200 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-07 21:14:17 +0100 |
commit | d6f92103e0f6696923a42f2c1fdc9fe4b877e7b8 (patch) | |
tree | 33fa5c20452e7666ca2907544ad34f3df764a814 | |
parent | 772ad7142dff590c7bb30370acf5d3c9a8fb512b (diff) | |
download | ffmpeg-d6f92103e0f6696923a42f2c1fdc9fe4b877e7b8.tar.gz |
h264: do not return an error when NAL parsing of extradata failed
Fixes AnnexB samples with broken extradata, but proper in-band parameter sets
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e02202840b..95248af8cf 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1233,7 +1233,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Error splitting the input into NAL units.\n"); - return ret; + /* don't consider NAL parsing failure a fatal error when parsing extradata, as the stream may work without it */ + return parse_extradata ? buf_size : ret; } if (avctx->active_thread_type & FF_THREAD_FRAME) |