h264: codec reinit: remove statements without effect
authorJanne Grunau <janne-libav@jannau.net>
Fri, 18 Apr 2014 12:07:52 +0000 (12:07 +0000)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sat, 19 Apr 2014 14:22:06 +0000 (16:22 +0200)
avctx->coded_{height,width} will always equal h->{height,width} since
init_dimensions() does that explicitly, Size changes are detected by
changes in mb_{height,width} earlier and propagated through the
needs_reinit variable.

libavcodec/h264_slice.c

index 897c8eb..aed2378 100644 (file)
@@ -1306,10 +1306,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0)
         }
     }
 
-    if (h->context_initialized &&
-        (h->width  != h->avctx->coded_width   ||
-         h->height != h->avctx->coded_height  ||
-         needs_reinit)) {
+    if (h->context_initialized && needs_reinit) {
         if (h != h0) {
             av_log(h->avctx, AV_LOG_ERROR,
                    "changing width %d -> %d / height %d -> %d on "