diff mbox series

[FFmpeg-devel,39/39] avcodec/avcodec: Don't free options on failure in avcodec_open2()

Message ID HE1PR0301MB21546B5802B45D7B301D33A98F299@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit 7af1a3cebef6d9654675252f57689d46ac17d1e9
Headers show
Series [FFmpeg-devel,01/39] avcodec/audiotoolboxenc: Remove AV_CODEC_CAP_DR1 | expand


Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate warning Make fate failed

Commit Message

Andreas Rheinhardt May 21, 2021, 9:17 a.m. UTC
Instead return the dictionary in the state it is at the time the error
occurred. This is more in line with the description of this parameter
and allows to notify the user of unrecognized options if an error
happens lateron (which might very well be due to e.g. misspelled

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/avcodec.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series


diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index a65109e799..d369b30bbc 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -372,7 +372,6 @@  end:
     return ret;
-    av_dict_free(options);
     goto end;