diff h264.c @ 7178:9a31b6a8ae52 libavcodec

Don't test for H264 encoding unless an encoder exists.
author astrange
date Wed, 02 Jul 2008 21:46:18 +0000
parents e943e1409077
children 847e1fc5c2a1
line wrap: on
line diff
--- a/h264.c	Wed Jul 02 12:24:50 2008 +0000
+++ b/h264.c	Wed Jul 02 21:46:18 2008 +0000
@@ -2726,9 +2726,9 @@
     MpegEncContext * const s = &h->s;
     const int mb_xy= h->mb_xy;
     const int mb_type= s->current_picture.mb_type[mb_xy];
-    int is_complex = FRAME_MBAFF || MB_FIELD || IS_INTRA_PCM(mb_type) || s->codec_id != CODEC_ID_H264 || (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || s->encoding;
-
-    if(!s->decode)
+    int is_complex = FRAME_MBAFF || MB_FIELD || IS_INTRA_PCM(mb_type) || s->codec_id != CODEC_ID_H264 || (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding);
+
+    if(ENABLE_H264_ENCODER && !s->decode)
         return;
 
     if (is_complex)