avformat/asfdec_f: Avoid stack packet

Replace it by using AVFormatInternal.parse_pkt which is otherwise unused
when reading a header.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt
2021-03-18 19:11:40 +01:00
parent 2e1d5123c1
commit 3750390ede

View File

@@ -860,17 +860,17 @@ static int asf_read_header(AVFormatContext *s)
} else {
if (!s->keylen) {
if (!ff_guidcmp(&g, &ff_asf_content_encryption)) {
AVPacket *pkt = s->internal->parse_pkt;
unsigned int len;
AVPacket pkt;
av_log(s, AV_LOG_WARNING,
"DRM protected stream detected, decoding will likely fail!\n");
len= avio_rl32(pb);
av_log(s, AV_LOG_DEBUG, "Secret data:\n");
if ((ret = av_get_packet(pb, &pkt, len)) < 0)
if ((ret = av_get_packet(pb, pkt, len)) < 0)
return ret;
av_hex_dump_log(s, AV_LOG_DEBUG, pkt.data, pkt.size);
av_packet_unref(&pkt);
av_hex_dump_log(s, AV_LOG_DEBUG, pkt->data, pkt->size);
av_packet_unref(pkt);
len= avio_rl32(pb);
if (len > UINT16_MAX)