You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/snow: Remove ff_snow_release_buffer()
Pointless after 7e41f95dce
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -511,27 +511,18 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_snow_release_buffer(AVCodecContext *avctx)
|
|
||||||
{
|
|
||||||
SnowContext *s = avctx->priv_data;
|
|
||||||
|
|
||||||
if(s->last_picture[s->max_ref_frames-1]->data[0]){
|
|
||||||
av_frame_unref(s->last_picture[s->max_ref_frames-1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int ff_snow_frames_prepare(SnowContext *s)
|
int ff_snow_frames_prepare(SnowContext *s)
|
||||||
{
|
{
|
||||||
AVFrame *tmp;
|
AVFrame *tmp;
|
||||||
|
|
||||||
ff_snow_release_buffer(s->avctx);
|
|
||||||
|
|
||||||
tmp= s->last_picture[s->max_ref_frames-1];
|
tmp= s->last_picture[s->max_ref_frames-1];
|
||||||
for (int i = s->max_ref_frames - 1; i > 0; i--)
|
for (int i = s->max_ref_frames - 1; i > 0; i--)
|
||||||
s->last_picture[i] = s->last_picture[i-1];
|
s->last_picture[i] = s->last_picture[i-1];
|
||||||
s->last_picture[0] = s->current_picture;
|
s->last_picture[0] = s->current_picture;
|
||||||
s->current_picture = tmp;
|
s->current_picture = tmp;
|
||||||
|
|
||||||
|
av_frame_unref(s->current_picture);
|
||||||
|
|
||||||
if(s->keyframe){
|
if(s->keyframe){
|
||||||
s->ref_frames= 0;
|
s->ref_frames= 0;
|
||||||
s->current_picture->flags |= AV_FRAME_FLAG_KEY;
|
s->current_picture->flags |= AV_FRAME_FLAG_KEY;
|
||||||
|
@@ -181,7 +181,6 @@ extern int ff_scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES];
|
|||||||
int ff_snow_common_init(AVCodecContext *avctx);
|
int ff_snow_common_init(AVCodecContext *avctx);
|
||||||
int ff_snow_common_init_after_header(AVCodecContext *avctx);
|
int ff_snow_common_init_after_header(AVCodecContext *avctx);
|
||||||
void ff_snow_common_end(SnowContext *s);
|
void ff_snow_common_end(SnowContext *s);
|
||||||
void ff_snow_release_buffer(AVCodecContext *avctx);
|
|
||||||
void ff_snow_reset_contexts(SnowContext *s);
|
void ff_snow_reset_contexts(SnowContext *s);
|
||||||
int ff_snow_alloc_blocks(SnowContext *s);
|
int ff_snow_alloc_blocks(SnowContext *s);
|
||||||
int ff_snow_frames_prepare(SnowContext *s);
|
int ff_snow_frames_prepare(SnowContext *s);
|
||||||
|
@@ -781,7 +781,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
|
|||||||
|
|
||||||
emms_c();
|
emms_c();
|
||||||
|
|
||||||
ff_snow_release_buffer(avctx);
|
av_frame_unref(s->last_picture[s->max_ref_frames - 1]);
|
||||||
|
|
||||||
if(!(s->avctx->debug&2048))
|
if(!(s->avctx->debug&2048))
|
||||||
res = av_frame_ref(picture, s->current_picture);
|
res = av_frame_ref(picture, s->current_picture);
|
||||||
|
@@ -2039,7 +2039,7 @@ redo_frame:
|
|||||||
|
|
||||||
update_last_header_values(s);
|
update_last_header_values(s);
|
||||||
|
|
||||||
ff_snow_release_buffer(avctx);
|
av_frame_unref(s->last_picture[s->max_ref_frames - 1]);
|
||||||
|
|
||||||
s->current_picture->pict_type = pic->pict_type;
|
s->current_picture->pict_type = pic->pict_type;
|
||||||
s->current_picture->quality = pic->quality;
|
s->current_picture->quality = pic->quality;
|
||||||
|
Reference in New Issue
Block a user