[FFmpeg-cvslog] Fix avisynth_context_create constructor error handling.
d s
git at videolan.org
Wed Mar 27 04:00:31 CET 2013
ffmpeg | branch: master | d s <avxsynth-testing at gmail.com> | Tue Mar 26 19:36:18 2013 -0700| [444001bda6adbabf458823b92a9b2a4991457d8d] | committer: Michael Niedermayer
Fix avisynth_context_create constructor error handling.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=444001bda6adbabf458823b92a9b2a4991457d8d
---
libavformat/avisynth.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index d31031d..3119a45 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -164,26 +164,22 @@ static av_cold int avisynth_context_create(AVFormatContext *s) {
return ret;
}
- if (!avs)
- return AVERROR_UNKNOWN;
-
- if (!avs_ctx_list) {
- avs_ctx_list = avs;
- } else {
- avs->next = avs_ctx_list;
- avs_ctx_list = avs;
- }
-
avs->env = avs_library->avs_create_script_environment(3);
if (avs_library->avs_get_error) {
const char *error = avs_library->avs_get_error(avs->env);
if (error) {
av_log(s, AV_LOG_ERROR, "%s\n", error);
- av_free(avs);
return AVERROR_UNKNOWN;
}
}
+ if (!avs_ctx_list) {
+ avs_ctx_list = avs;
+ } else {
+ avs->next = avs_ctx_list;
+ avs_ctx_list = avs;
+ }
+
return 0;
}
More information about the ffmpeg-cvslog
mailing list