summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-03-14 00:54:01 +0100
committerMarton Balint <cus@passwd.hu>2012-03-19 22:54:40 +0100
commita2c5be631962a8d0dd59b12fa58292d8c042236c (patch)
tree3e3416366c02228f379f785a6aadaf678f60dfe8 /ffplay.c
parent2b07f572af65aa411a24e87348671fad7cd10fe9 (diff)
ffplay: reset audio_pkt_temp when opening audio
Otherwise we may use the remaining data of the last packet from the previous audio stream. Fixes bug #951. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index e831f83901..8a5818f466 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2253,6 +2253,7 @@ static int stream_component_open(VideoState *is, int stream_index)
avctx->flags |= CODEC_FLAG_EMU_EDGE;
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
+ memset(&is->audio_pkt_temp, 0, sizeof(is->audio_pkt_temp));
env = SDL_getenv("SDL_AUDIO_CHANNELS");
if (env)
wanted_channel_layout = av_get_default_channel_layout(SDL_atoi(env));