Assert on `avctx->codec->encode2` to avoid a SEGFAULT on the subsequent
function call.
---
libavcodec/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4da16ee..f51070c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1953,6 +1953,8 @@ int attribute_align_arg
avcodec_encode_audio2(AVCodecContext *avctx,
}
}
+ av_assert0(avctx->codec->encode2);
+
ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
if (!ret) {
if (*got_packet_ptr) {
--
2.5.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel