Message ID | AM7PR03MB66603A4A2CDA0BA65691E7118F699@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 531d289cfd853567df69d5eb490425677e3759b9 |
Headers | show |
Series | [FFmpeg-devel,1/2] avdevice/lavfi: Properly free an AVDictionary | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
LGTM
Andreas Rheinhardt (12021-12-02): > It is not documented that freeing the last (and only) entry of > an AVDictionary frees the dictionary. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavdevice/lavfi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Ok to the whole series. Regards,
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 826dafbd00..d9083ad984 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -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) goto end; 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) goto end; av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
It is not documented that freeing the last (and only) entry of an AVDictionary frees the dictionary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavdevice/lavfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)