mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/ipmovie: Avoid stack packet
Replace it in ipmovie_read_header() by AVFormatInternal.parse_pkt which is unused when reading the header. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
79a90b42ca
commit
0519a32a64
@ -608,7 +608,6 @@ static int ipmovie_read_header(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
IPMVEContext *ipmovie = s->priv_data;
|
IPMVEContext *ipmovie = s->priv_data;
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
AVPacket pkt;
|
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
unsigned char chunk_preamble[CHUNK_PREAMBLE_SIZE];
|
unsigned char chunk_preamble[CHUNK_PREAMBLE_SIZE];
|
||||||
int chunk_type, i;
|
int chunk_type, i;
|
||||||
@ -645,8 +644,7 @@ static int ipmovie_read_header(AVFormatContext *s)
|
|||||||
|
|
||||||
if (chunk_type == CHUNK_VIDEO)
|
if (chunk_type == CHUNK_VIDEO)
|
||||||
ipmovie->audio_type = AV_CODEC_ID_NONE; /* no audio */
|
ipmovie->audio_type = AV_CODEC_ID_NONE; /* no audio */
|
||||||
else if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_AUDIO) {
|
else if (process_ipmovie_chunk(ipmovie, pb, s->internal->parse_pkt) != CHUNK_INIT_AUDIO) {
|
||||||
av_packet_unref(&pkt);
|
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user