Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2012-02-08 20:28:02 +0400
committerClément Bœsch <ubitux@gmail.com>2012-02-10 23:13:36 +0400
commit63b5e99fab045ff4819fa11b916161835e219e11 (patch)
treeaa2f2995ca124689518172771f4672edd4c309d4 /ffmpeg.c
parent086fc4d7656e518400cf17e6c317cd87219ccd19 (diff)
ffmpeg: make use of ret error out in transcode_video().
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a02b1a9151..abbd71e628 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2135,10 +2135,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
goto cont;
}
if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) {
- av_free(buffer_to_free);
- return AVERROR(ENOMEM);
- } else
- avcodec_get_frame_defaults(ist->filtered_frame);
+ ret = AVERROR(ENOMEM);
+ goto end;
+ }
+ avcodec_get_frame_defaults(ist->filtered_frame);
filtered_frame = ist->filtered_frame;
*filtered_frame= *decoded_frame; //for me_threshold
if (ost->picref) {
@@ -2158,6 +2158,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
#endif
}
+end:
av_free(buffer_to_free);
return ret;
}