aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-17 21:17:45 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-09-21 20:56:53 +0200
commit27128d82faf17cbf476cf5f750722612639bdcd7 (patch)
treee7af02bb107d2767e684179b93ba80035ced5171
parented288c0edd3a77537adbeb34c081363ea73e9c14 (diff)
downloadffmpeg-27128d82faf17cbf476cf5f750722612639bdcd7.tar.gz
rmdec: use the deinterleaving mode and not the codec when creating audio packets.
It prevents crashes due to non initialized fields. Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commit 3e033da84782e12ed529e6a88dd53b6a72199e8e)
-rw-r--r--libavformat/rmdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index cacca9bc89..525e276dde 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -801,7 +801,8 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
assert (rm->audio_pkt_cnt > 0);
- if (st->codec->codec_id == CODEC_ID_AAC)
+ if (ast->deint_id == DEINT_ID_VBRF ||
+ ast->deint_id == DEINT_ID_VBRS)
av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
else {
av_new_packet(pkt, st->codec->block_align);