aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-14 13:37:20 -0700
committerChris Robinson <[email protected]>2016-09-14 13:37:20 -0700
commit4486043ae509f00a971e30f1da642f2351f1974d (patch)
treee4645f477d964fc4dbd44a696043cdba5430d1b8 /examples
parent2f1f7f4c6aaf54f9361865d508d82cdf027368bf (diff)
Skip audio packets that fail to decode in alffplay
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/alffplay.c b/examples/alffplay.c
index e95dede6..b61828f0 100644
--- a/examples/alffplay.c
+++ b/examples/alffplay.c
@@ -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)
{