# HG changeset patch # User astrange # Date 1215035178 0 # Node ID 9a31b6a8ae527db0a6750aac485b46b331639645 # Parent a82e7d9c8c343985b38f59a9aee39f13c5e514d1 Don't test for H264 encoding unless an encoder exists. diff -r a82e7d9c8c34 -r 9a31b6a8ae52 h264.c --- 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) diff -r a82e7d9c8c34 -r 9a31b6a8ae52 h264.h --- a/h264.h Wed Jul 02 12:24:50 2008 +0000 +++ b/h264.h Wed Jul 02 21:46:18 2008 +0000 @@ -70,6 +70,10 @@ #endif #define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE) +#ifndef ENABLE_H264_ENCODER +#define ENABLE_H264_ENCODER 0 +#endif + /** * Sequence parameter set */