mirror of https://git.ffmpeg.org/ffmpeg.git
avdevice/lavfi: Properly free an AVDictionary
It is not documented that freeing the last (and only) entry of an AVDictionary frees the dictionary. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
05c924a86d
commit
531d289cfd
|
@ -150,7 +150,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
|
||||||
if (avctx->protocol_whitelist && (ret = av_dict_set(&options, "protocol_whitelist", avctx->protocol_whitelist, 0)) < 0)
|
if (avctx->protocol_whitelist && (ret = av_dict_set(&options, "protocol_whitelist", avctx->protocol_whitelist, 0)) < 0)
|
||||||
goto end;
|
goto end;
|
||||||
ret = avio_open2(&avio, lavfi->graph_filename, AVIO_FLAG_READ, &avctx->interrupt_callback, &options);
|
ret = avio_open2(&avio, lavfi->graph_filename, AVIO_FLAG_READ, &avctx->interrupt_callback, &options);
|
||||||
av_dict_set(&options, "protocol_whitelist", NULL, 0);
|
av_dict_free(&options);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto end;
|
goto end;
|
||||||
av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
|
av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
|
||||||
|
|
Loading…
Reference in New Issue