Commit 63b5e99f authored by Clément Bœsch's avatar Clément Bœsch Committed by Clément Bœsch

ffmpeg: make use of ret error out in transcode_video().

parent 086fc4d7
...@@ -2135,10 +2135,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ...@@ -2135,10 +2135,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
goto cont; goto cont;
} }
if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) { if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) {
av_free(buffer_to_free); ret = AVERROR(ENOMEM);
return AVERROR(ENOMEM); goto end;
} else }
avcodec_get_frame_defaults(ist->filtered_frame); avcodec_get_frame_defaults(ist->filtered_frame);
filtered_frame = ist->filtered_frame; filtered_frame = ist->filtered_frame;
*filtered_frame= *decoded_frame; //for me_threshold *filtered_frame= *decoded_frame; //for me_threshold
if (ost->picref) { if (ost->picref) {
...@@ -2158,6 +2158,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ...@@ -2158,6 +2158,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
#endif #endif
} }
end:
av_free(buffer_to_free); av_free(buffer_to_free);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment