avcodec/pcm-dvd: reset last header on errors

Fixes: msan_uninit-mem_7f4fff975a2c_4957_dvd_audio_sample.aob
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-27 03:00:13 +01:00
parent 42b6805cc1
commit f55bc96a54
1 changed files with 1 additions and 0 deletions

View File

@ -70,6 +70,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header)
/* early exit if the header didn't change apart from the frame number */ /* early exit if the header didn't change apart from the frame number */
if (s->last_header == header_int) if (s->last_header == header_int)
return 0; return 0;
s->last_header = -1;
if (avctx->debug & FF_DEBUG_PICT_INFO) if (avctx->debug & FF_DEBUG_PICT_INFO)
av_dlog(avctx, "pcm_dvd_parse_header: header = %02x%02x%02x\n", av_dlog(avctx, "pcm_dvd_parse_header: header = %02x%02x%02x\n",