Commit d6f92103 authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Derek Buitenhuis

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: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 772ad714
...@@ -1233,7 +1233,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, ...@@ -1233,7 +1233,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
if (ret < 0) { if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Error splitting the input into NAL units.\n"); "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) if (avctx->active_thread_type & FF_THREAD_FRAME)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment