summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-06 23:20:41 +0100
committerwm4 <wm4@nowhere>2015-02-06 23:22:16 +0100
commitbe5994a7818a63e16d78ed4817eb1ac490869bfe (patch)
treea6322d3e942bd945b32a1310aaa35a7fa2c0c116 /video/decode/vd_lavc.c
parent5de29b860b25bb4ba8b1e02d9b3aee7a81009be0 (diff)
downloadmpv-be5994a7818a63e16d78ed4817eb1ac490869bfe.tar.bz2
mpv-be5994a7818a63e16d78ed4817eb1ac490869bfe.tar.xz
video: work around libswscale for PNG pixel formats
The intention is that we can test vo_opengl with high bit depth PNGs better. This throws libswscale completely out of the loop, which before was needed in order to convert from big endian to little endian. Also apply a minimal cleanup to fmt-conversion.c (unrelated).
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index ff2fa71131..109099e382 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -45,6 +45,7 @@
#include "demux/stheader.h"
#include "demux/packet.h"
#include "video/csputils.h"
+#include "video/sws_utils.h"
#include "lavc.h"
@@ -648,7 +649,7 @@ static int decode(struct dec_video *vd, struct demux_packet *packet,
if (ctx->hwdec && ctx->hwdec->process_image)
mpi = ctx->hwdec->process_image(ctx, mpi);
- *out_image = mpi;
+ *out_image = mp_img_swap_to_native(mpi);
return 1;
}