You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg: Avoid creating unnecessary reference
The only caller of do_video_out() doesn't need the frame afterwards, ergo one can replace an av_frame_ref() by av_frame_move_ref(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1138,6 +1138,7 @@ static void do_subtitle_out(OutputFile *of,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* May modify/reset next_picture */
|
||||||
static void do_video_out(OutputFile *of,
|
static void do_video_out(OutputFile *of,
|
||||||
OutputStream *ost,
|
OutputStream *ost,
|
||||||
AVFrame *next_picture)
|
AVFrame *next_picture)
|
||||||
@@ -1421,8 +1422,7 @@ static void do_video_out(OutputFile *of,
|
|||||||
|
|
||||||
av_frame_unref(ost->last_frame);
|
av_frame_unref(ost->last_frame);
|
||||||
if (next_picture)
|
if (next_picture)
|
||||||
if (av_frame_ref(ost->last_frame, next_picture) < 0)
|
av_frame_move_ref(ost->last_frame, next_picture);
|
||||||
goto error;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
error:
|
error:
|
||||||
|
Reference in New Issue
Block a user