[FFmpeg-cvslog] h264: do not return an error when NAL parsing of extradata failed
Hendrik Leppkes
git at videolan.org
Sat May 7 22:22:52 CEST 2016
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat May 7 13:28:31 2016 +0200| [d6f92103e0f6696923a42f2c1fdc9fe4b877e7b8] | committer: 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: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6f92103e0f6696923a42f2c1fdc9fe4b877e7b8
---
libavcodec/h264.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e022028..95248af 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)
More information about the ffmpeg-cvslog
mailing list