mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/ffmenc: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c8c10a5fc7
commit
b68d902b6e
@ -137,7 +137,7 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
|
|||||||
goto fail;
|
goto fail;
|
||||||
if (buf && strlen(buf)) {
|
if (buf && strlen(buf)) {
|
||||||
avio_write(tmp, buf, strlen(buf));
|
avio_write(tmp, buf, strlen(buf));
|
||||||
av_free(buf);
|
av_freep(&buf);
|
||||||
need_coma = 1;
|
need_coma = 1;
|
||||||
}
|
}
|
||||||
if ((ret = av_opt_serialize(ctx, 0, SKIP_DEFAULTS | OPT_FLAGS_EXACT, &buf, '=', ',')) < 0)
|
if ((ret = av_opt_serialize(ctx, 0, SKIP_DEFAULTS | OPT_FLAGS_EXACT, &buf, '=', ',')) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user