summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-12 15:50:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-08 12:52:50 +0200
commit7af1a3cebef6d9654675252f57689d46ac17d1e9 (patch)
tree2fd05f3cb47df62c43fcb26147b3164e1eadee19 /libavcodec/avcodec.c
parentd29541c90aaa2e16d25411ba73f96576da99e0e1 (diff)
downloadffmpeg-7af1a3cebef6d9654675252f57689d46ac17d1e9.tar.gz
avcodec/avcodec: Don't free options on failure in avcodec_open2()
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 options). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c1
1 files changed, 0 insertions, 1 deletions
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;
free_and_end:
avcodec_close(avctx);
- av_dict_free(options);
goto end;
}