avcodec: fix uninitialized variable read

This cna happen if the user tries to call the new decode API for
subtitles.

Fixes CID 1402071.

(cherry picked from commit b4b8ca24f6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
wm4 2017-03-07 09:56:42 +01:00 committed by Michael Niedermayer
parent a99a7bb071
commit 4ed0177e4a

View File

@ -2771,7 +2771,7 @@ void avsubtitle_free(AVSubtitle *sub)
static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
{
int got_frame;
int got_frame = 0;
int ret;
av_assert0(!avctx->internal->buffer_frame->buf[0]);