summaryrefslogtreecommitdiffstats
path: root/video/sws_utils.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-20 18:36:39 +0200
committerwm4 <wm4@nowhere>2020-05-20 18:38:19 +0200
commiteb27baf5ec17d15b96db6db93c400a14b07214be (patch)
tree12887e0245bdd3a9419a5a08233312d78d545800 /video/sws_utils.c
parentd291673d40833f2249cd62f0ec690bf3aef38a73 (diff)
downloadmpv-eb27baf5ec17d15b96db6db93c400a14b07214be.tar.bz2
mpv-eb27baf5ec17d15b96db6db93c400a14b07214be.tar.xz
video: remove useless mp_imgfmt_desc.avformat field
Had 1 user; easily replaced.
Diffstat (limited to 'video/sws_utils.c')
-rw-r--r--video/sws_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/sws_utils.c b/video/sws_utils.c
index 800e4f34b3..ce07cdd132 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -393,9 +393,10 @@ static const int endian_swaps[][2] = {
// might reduce the effective bit depth in some cases.
struct mp_image *mp_img_swap_to_native(struct mp_image *img)
{
+ int avfmt = imgfmt2pixfmt(img->imgfmt);
int to = AV_PIX_FMT_NONE;
for (int n = 0; endian_swaps[n][0] != AV_PIX_FMT_NONE; n++) {
- if (endian_swaps[n][0] == img->fmt.avformat)
+ if (endian_swaps[n][0] == avfmt)
to = endian_swaps[n][1];
}
if (to == AV_PIX_FMT_NONE || !mp_image_make_writeable(img))