[FFmpeg-devel] [PATCH 2/2] Use the deinterleaving mode and not the codec when creating audio packets in RM demuxer.
fenrir at elivagar.org
fenrir at elivagar.org
Sun Sep 18 00:17:45 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
It prevents crashes due to non initialized fields.
---
libavformat/rmdec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index be5f325..56ad331 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -818,7 +818,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);
--
1.7.2.5
More information about the ffmpeg-devel
mailing list