summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vd_ffmpeg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 0986b083fe..efc2eb465c 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -289,7 +289,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
mpi->stride[2]*=2;
}
-#ifdef FF_POSTPROCESS
+/* to comfirm with newer lavc style */
+#if !defined(FF_POSTPROCESS) && (LIBAVCODEC_BUILD > 4612)
+ mpi->qscale=avctx->quant_store;
+#if LIBAVCODEC_BUILD > 4613
+ mpi->qstride=avctx->qstride;
+#else
+ mpi->qstride=MBC+1;
+#endif
+#else ifdef FF_POSTPROCESS
mpi->qscale=&quant_store[0][0];
mpi->qstride=MBC+1;
#endif