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

Andreas Rheinhardt git at videolan.org
Tue Jun 8 16:05:02 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed May 12 15:50:30 2021 +0200| [7af1a3cebef6d9654675252f57689d46ac17d1e9] | committer: Andreas Rheinhardt

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 at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7af1a3cebef6d9654675252f57689d46ac17d1e9
---

 libavcodec/avcodec.c | 1 -
 1 file changed, 1 deletion(-)

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;
 }
 



More information about the ffmpeg-cvslog mailing list