diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 24cc61bcc2..d31eb0bdab 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -249,7 +249,8 @@ static int init(sh_video_t *sh){ } #if LIBAVCODEC_BUILD >= 4639 - avctx->bits_per_sample= sh->bih->biBitCount; + if(sh->bih) + avctx->bits_per_sample= sh->bih->biBitCount; #endif /* open it */