History

lavc/vvcdec: remove unneeded set_output_format

Downstream can determine the format from the output frame format

Nuo Mi committed 1 year ago

Commit 61ff0fa1 parent 3380c0d1 file · +2 −21Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vvc/dec.c+2−21
@@ -961,19 +961,6 @@ fail: · 960 unmodified lines
961961 return ret;
962962 }
963963
964−static int set_output_format(const VVCContext *s, const AVFrame *output)
965−{
966− AVCodecContext *c = s->avctx;
967− int ret;
968−
969− if (output->width != c->width || output->height != c->height) {
970− if ((ret = ff_set_dimensions(c, output->width, output->height)) < 0)
971− return ret;
972− }
973− c->pix_fmt = output->format;
974− return 0;
975−}
976−
977964 static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
978965 {
979966 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) · 1 unmodified line
981968
982969 if (!ret && delayed->output_frame->buf[0] && output) {
983970 av_frame_move_ref(output, delayed->output_frame);
984− ret = set_output_format(s, output);
985− if (!ret)
986− *got_output = 1;
971+ *got_output = 1;
987972 }
988973 s->nb_delayed--;
989974
@@ -1034,11 +1019,7 @@ static int get_decoded_frame(VVCContext *s, AVFrame *output, int *got_output) · 44 unmodified lines
10341019 ret = ff_vvc_output_frame(s, last, output, 0, 1);
10351020 if (ret < 0)
10361021 return ret;
1037− if (ret) {
1038− *got_output = ret;
1039− if ((ret = set_output_format(s, output)) < 0)
1040− return ret;
1041− }
1022+ *got_output = ret;
10421023 }
10431024 return 0;
10441025 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t