You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavc/vvcdec: remove unneeded set_output_format
Downstream can determine the format from the output frame format Co-authored-by: Frank Plowman <post@frankplowman.com>
This commit is contained in:
@@ -961,19 +961,6 @@ fail:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_output_format(const VVCContext *s, const AVFrame *output)
|
|
||||||
{
|
|
||||||
AVCodecContext *c = s->avctx;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (output->width != c->width || output->height != c->height) {
|
|
||||||
if ((ret = ff_set_dimensions(c, output->width, output->height)) < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
c->pix_fmt = output->format;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
|
static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
|
||||||
{
|
{
|
||||||
VVCFrameContext *delayed = get_frame_context(s, s->fcs, s->nb_frames - s->nb_delayed);
|
VVCFrameContext *delayed = get_frame_context(s, s->fcs, s->nb_frames - s->nb_delayed);
|
||||||
@@ -981,9 +968,7 @@ static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
|
|||||||
|
|
||||||
if (!ret && delayed->output_frame->buf[0] && output) {
|
if (!ret && delayed->output_frame->buf[0] && output) {
|
||||||
av_frame_move_ref(output, delayed->output_frame);
|
av_frame_move_ref(output, delayed->output_frame);
|
||||||
ret = set_output_format(s, output);
|
*got_output = 1;
|
||||||
if (!ret)
|
|
||||||
*got_output = 1;
|
|
||||||
}
|
}
|
||||||
s->nb_delayed--;
|
s->nb_delayed--;
|
||||||
|
|
||||||
@@ -1034,11 +1019,7 @@ static int get_decoded_frame(VVCContext *s, AVFrame *output, int *got_output)
|
|||||||
ret = ff_vvc_output_frame(s, last, output, 0, 1);
|
ret = ff_vvc_output_frame(s, last, output, 0, 1);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (ret) {
|
*got_output = ret;
|
||||||
*got_output = ret;
|
|
||||||
if ((ret = set_output_format(s, output)) < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user