---
I did not expect that it would crash. And why should it? So just make it work.
---
 libavcodec/utils.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8cbd47b..e2d9096 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2079,6 +2079,9 @@ const char *avcodec_license(void)
 
 void avcodec_flush_buffers(AVCodecContext *avctx)
 {
+    if (!avctx->internal)
+        return;
+
     if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
         ff_thread_flush(avctx);
     else if (avctx->codec->flush)
-- 
2.1.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to