[FFmpeg-cvslog] ffmpeg: make use of ret error out in transcode_video().
Clément Bœsch
git at videolan.org
Fri Feb 10 20:35:09 CET 2012
ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Wed Feb 8 17:28:02 2012 +0100| [63b5e99fab045ff4819fa11b916161835e219e11] | committer: Clément Bœsch
ffmpeg: make use of ret error out in transcode_video().
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63b5e99fab045ff4819fa11b916161835e219e11
---
ffmpeg.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index a02b1a9..abbd71e 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;
}
More information about the ffmpeg-cvslog
mailing list