diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5116ca232db20696a49a1cac539d93964520da6c..d0474489d967d81beec83a214fa06751d6dbc26e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2574,9 +2574,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
         s->avctx->sample_aspect_ratio= h->sps.sar;
         av_assert0(s->avctx->sample_aspect_ratio.den);
 
-        h->s.avctx->coded_width = 16*s->mb_width;
-        h->s.avctx->coded_height = 16*s->mb_height;
-
         if(h->sps.video_signal_type_present_flag){
             s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
             if(h->sps.colour_description_present_flag){