summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vd_libmpeg2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c
index 44ee2e5783..55e1cdee9f 100644
--- a/libmpcodecs/vd_libmpeg2.c
+++ b/libmpcodecs/vd_libmpeg2.c
@@ -63,7 +63,9 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
} else {
mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_DRAW_CALLBACK,
sh->disp_w, sh->disp_h);
- mpeg2_decode_data(sh->video_out, data, data+len,flags&3); // decode
+ if(
+ mpeg2_decode_data(sh->video_out, data, data+len,flags&3)==0 // decode
+ )return NULL;//hack for interlaced mpeg2
}
return mpi;
}