diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-06 15:48:21 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-08 18:03:45 +0200 |
commit | 5c3a8c76dfc5a43666ea220472e24fc605f34fa6 (patch) | |
tree | 2dad48b61b60b0c9ad01185197dcc5ab88186c53 /libmpcodecs | |
parent | e666e3ce9199946bde9b4a2691ccb73c99e45ab4 (diff) | |
download | mpv-5c3a8c76dfc5a43666ea220472e24fc605f34fa6.tar.bz2 mpv-5c3a8c76dfc5a43666ea220472e24fc605f34fa6.tar.xz |
ad_ffmpeg: Handle EAGAIN, needed for LATM to work properly with demux_ts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32583 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 7d945794b8..9009aaa82c 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -234,6 +234,9 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m } 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); + // LATM may need many packets to find mux info + if (y == AVERROR(EAGAIN)) + continue; if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; } if(!sh_audio->parser && y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!) |