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>
pull/2/head
Laurent Aimar 13 years ago committed by Anton Khirnov
parent 63d64228a7
commit 3e033da847
  1. 3
      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);

Loading…
Cancel
Save