mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
avformat/matroskaenc: Avoid allocation of AVPacket
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f660b8d1de
commit
9b41fddf3e
@ -453,8 +453,6 @@ static void mkv_deinit(AVFormatContext *s)
|
||||
{
|
||||
MatroskaMuxContext *mkv = s->priv_data;
|
||||
|
||||
av_packet_free(&mkv->cur_audio_pkt);
|
||||
|
||||
ffio_free_dyn_buf(&mkv->cluster_bc);
|
||||
ffio_free_dyn_buf(&mkv->info.bc);
|
||||
ffio_free_dyn_buf(&mkv->track.bc);
|
||||
@ -2682,9 +2680,8 @@ static int mkv_init(struct AVFormatContext *s)
|
||||
} else
|
||||
mkv->mode = MODE_MATROSKAv2;
|
||||
|
||||
mkv->cur_audio_pkt = av_packet_alloc();
|
||||
if (!mkv->cur_audio_pkt)
|
||||
return AVERROR(ENOMEM);
|
||||
mkv->cur_audio_pkt = ffformatcontext(s)->pkt;
|
||||
|
||||
mkv->tracks = av_calloc(s->nb_streams, sizeof(*mkv->tracks));
|
||||
if (!mkv->tracks)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user