avformat/latmenc: Add assert to avoid coverity warning

Fixes CID1322323

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-03 10:37:13 +02:00
parent 8d2b4b8c82
commit 879603fa3f

View File

@ -124,7 +124,8 @@ static void latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
if (!ctx->channel_conf) {
GetBitContext gb;
init_get_bits8(&gb, avctx->extradata, avctx->extradata_size);
int ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size);
av_assert0(ret >= 0); // extradata size has been checked already, so this should not fail
skip_bits_long(&gb, ctx->off + 3);
avpriv_copy_pce_data(bs, &gb);
}