If we don't propagate these errors, h264dec and hevcdec can get up to all sorts
of
weirdness, especially threaded, while trying to continue on with things they
shouldn't.
Can cause stuff like:
[hevc @ 0x5555577107c0] get_buffer() cannot be called after
ff_thread_finish_setup()
[hevc @ 0x5555577107c0] thread_get_buffer() failed
[hevc @ 0x5555577107c0] Error parsing NAL unit #5.
Error while decoding stream #0:0: Cannot allocate memory
<deadlock>
Signed-off-by: Derek Buitenhuis <[email protected]>
---
libavcodec/h2645_parse.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 942f2c5d71..175c986c71 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -503,6 +503,8 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t
*buf, int length,
nal->type);
}
pkt->nb_nals--;
+ if (ret < 0)
+ return ret;
}
}
--
2.20.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel