aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-14 16:58:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-15 00:16:20 +0200
commit900fe8ee5d17b8f2bd2bd5f1fdd62cf992525bc8 (patch)
treeee68e6d5129e83aa1f7eff8295a7ff947888e58d
parent88a2e4504d1820e717730ff5f5dc0cf4d90cdd6e (diff)
downloadffmpeg-900fe8ee5d17b8f2bd2bd5f1fdd62cf992525bc8.tar.gz
avcodec/dnxhdenc: Assert that frame size is not assigned an error code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dnxhdenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 59e3f73689..6e9b54de4f 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -478,6 +478,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
if (ctx->cid_table->frame_size == DNXHD_VARIABLE) {
ctx->frame_size = ff_dnxhd_get_hr_frame_size(ctx->cid,
avctx->width, avctx->height);
+ av_assert0(ctx->frame_size >= 0);
ctx->coding_unit_size = ctx->frame_size;
} else {
ctx->frame_size = ctx->cid_table->frame_size;