Browse code

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>

Laurent Aimar authored on 2011/09/18 06:17:45
Showing 1 changed files
... ...
@@ -813,7 +813,8 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
813 813
 
814 814
     assert (rm->audio_pkt_cnt > 0);
815 815
 
816
-    if (st->codec->codec_id == CODEC_ID_AAC)
816
+    if (ast->deint_id == DEINT_ID_VBRF ||
817
+        ast->deint_id == DEINT_ID_VBRS)
817 818
         av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
818 819
     else {
819 820
         av_new_packet(pkt, st->codec->block_align);