[MPlayer-cvslog] r37946 - trunk/libmpcodecs/ad_ffmpeg.c
reimar
subversion at mplayerhq.hu
Mon Jul 3 22:00:43 EEST 2017
Author: reimar
Date: Mon Jul 3 22:00:43 2017
New Revision: 37946
Log:
ad_ffmpeg.c: Fix decoding after FFmpeg broke API.
Patch for FFmpeg also sent to list.
Fixes trac issue #2329.
Modified:
trunk/libmpcodecs/ad_ffmpeg.c
Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c Fri Jun 30 23:29:33 2017 (r37945)
+++ trunk/libmpcodecs/ad_ffmpeg.c Mon Jul 3 22:00:43 2017 (r37946)
@@ -332,6 +332,11 @@ static int decode_audio(sh_audio_t *sh_a
int in_size = x;
int consumed = ds_parse(sh_audio->ds, &start, &x, pts, 0);
sh_audio->ds->buffer_pos -= in_size - consumed;
+ // Note: hopefully below is correct, it was only
+ // added because FFmpeg broke the API and 0-sized
+ // packets started to break e.g. AC3 decode.
+ if (x <= 0)
+ break; // error or not enough data
}
av_init_packet(&pkt);
More information about the MPlayer-cvslog
mailing list