Skip audio packets that fail to decode in alffplay

This commit is contained in:
Chris Robinson
2016-09-14 13:37:20 -07:00
parent 2f1f7f4c6a
commit 4486043ae5
+5 -1
View File
@@ -414,7 +414,11 @@ static int audio_decode_frame(MovieState *movState)
int got_frame = 0;
int len1 = avcodec_decode_audio4(movState->audio.st->codec, frame,
&got_frame, pkt);
if(len1 < 0) break;
if(len1 < 0)
{
av_shrink_packet(pkt, 0);
continue;
}
if(len1 <= pkt->size)
{