[FFmpeg-cvslog] rmdec: use the deinterleaving mode and not the codec when creating audio packets.

Laurent Aimar git at videolan.org
Mon Sep 19 22:54:14 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Sep 17 21:17:45 2011 +0000| [3e033da84782e12ed529e6a88dd53b6a72199e8e] | committer: Anton Khirnov

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 at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e033da84782e12ed529e6a88dd53b6a72199e8e
---

 libavformat/rmdec.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 02ff7e9..4b89181 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -813,7 +813,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);



More information about the ffmpeg-cvslog mailing list