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
961 return ret;961 return ret;
962}962}
963 963
964static 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
977static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)964static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
978{965{
979 VVCFrameContext *delayed = get_frame_context(s, s->fcs, s->nb_frames - s->nb_delayed);966 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
981 968
982 if (!ret && delayed->output_frame->buf[0] && output) {969 if (!ret && delayed->output_frame->buf[0] && output) {
983 av_frame_move_ref(output, delayed->output_frame);970 av_frame_move_ref(output, delayed->output_frame);
984 ret = set_output_format(s, output);971 *got_output = 1;
985 if (!ret)
986 *got_output = 1;
987 }972 }
988 s->nb_delayed--;973 s->nb_delayed--;
989 974
@@ -1034,11 +1019,7 @@ static int get_decoded_frame(VVCContext *s, AVFrame *output, int *got_output) · 44 unmodified lines
1034 ret = ff_vvc_output_frame(s, last, output, 0, 1);1019 ret = ff_vvc_output_frame(s, last, output, 0, 1);
1035 if (ret < 0)1020 if (ret < 0)
1036 return ret;1021 return ret;
1037 if (ret) {1022 *got_output = ret;
1038 *got_output = ret;
1039 if ((ret = set_output_format(s, output)) < 0)
1040 return ret;
1041 }
1042 }1023 }
1043 return 0;1024 return 0;
1044}1025}

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