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 3e033da847
)
This commit is contained in:

committed by
Michael Niedermayer

parent
ed288c0edd
commit
27128d82fa
@@ -801,7 +801,8 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
|
|||||||
|
|
||||||
assert (rm->audio_pkt_cnt > 0);
|
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]);
|
av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
|
||||||
else {
|
else {
|
||||||
av_new_packet(pkt, st->codec->block_align);
|
av_new_packet(pkt, st->codec->block_align);
|
||||||
|
Reference in New Issue
Block a user