Mercurial > mplayer.hg
diff libmpcodecs/ad_ffmpeg.c @ 30272:c6c40936049c
We only need to disable seeking back in ad_ffmpeg when we actually _use_
a parser, not when just needs_parsing is set.
Fixes playback of e.g. ADPCM in AVI like http://samples.mplayerhq.hu/avi/imaadpcm.avi
author | reimar |
---|---|
date | Fri, 15 Jan 2010 21:01:31 +0000 |
parents | 4977e04f3a18 |
children | 0140d505dd91 |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Fri Jan 15 19:50:59 2010 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Fri Jan 15 21:01:31 2010 +0000 @@ -188,7 +188,7 @@ y=avcodec_decode_audio3(sh_audio->context,(int16_t*)buf,&len2,&pkt); //printf("return:%d samples_out:%d bitstream_in:%d sample_sum:%d\n", y, len2, x, len); fflush(stdout); if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; } - if(!sh_audio->needs_parsing && y<x) + if(!sh_audio->parser && y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!) if(len2>0){ if (((AVCodecContext *)sh_audio->context)->channels >= 5) {