diff libmpeg2/slice.c @ 21923:1658f7d97b27

fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
author henry
date Tue, 16 Jan 2007 09:49:28 +0000
parents 60a39d71e247
children fd18fa10de53
line wrap: on
line diff
--- a/libmpeg2/slice.c	Tue Jan 16 07:12:32 2007 +0000
+++ b/libmpeg2/slice.c	Tue Jan 16 09:49:28 2007 +0000
@@ -1604,6 +1604,12 @@
     }									\
 } while (0)
 
+static void motion_dummy (mpeg2_decoder_t * const decoder,
+                          motion_t * const motion,
+                          mpeg2_mc_fct * const * const table)
+{
+}
+
 void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, uint8_t * current_fbuf[3],
 		      uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3])
 {
@@ -1661,7 +1667,9 @@
 
     if (decoder->mpeg1) {
 	decoder->motion_parser[0] = motion_zero_420;
+        decoder->motion_parser[MC_FIELD] = motion_dummy;
 	decoder->motion_parser[MC_FRAME] = motion_mp1;
+        decoder->motion_parser[MC_DMV] = motion_dummy;
 	decoder->motion_parser[4] = motion_reuse_420;
     } else if (decoder->picture_structure == FRAME_PICTURE) {
 	if (decoder->chroma_format == 0) {