diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 63a30b93ce9492ba8b4e38e8ddb554ddc985fd8a..e29558b3a288ab0ce5a993b9d031d1c89b452ce2 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -225,7 +225,7 @@ static void dct_unquantize_h263_intra_c(MpegEncContext *s,
     if(s->ac_pred)
         nCoeffs=63;
     else
-        nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
+        nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ];
 
     for(i=1; i<=nCoeffs; i++) {
         level = block[i];