# HG changeset patch # User reimar # Date 1263589291 0 # Node ID c6c40936049c6ebc2ee9fca21b6e865ea9e3d61e # Parent 2fad32dd128c918a0330891fc584241430b257fe 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 diff -r 2fad32dd128c -r c6c40936049c libmpcodecs/ad_ffmpeg.c --- 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 && yparser && yds->buffer_pos+=y-x; // put back data (HACK!) if(len2>0){ if (((AVCodecContext *)sh_audio->context)->channels >= 5) {