aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2008-07-02 21:46:18 +0000
committerAlexander Strange <astrange@ithinksw.com>2008-07-02 21:46:18 +0000
commitfedec603db2b673d122244691c950df07df95222 (patch)
treebc1ac01758f066d36c63c06d609805613843dea7 /libavcodec
parent5faf3a4449ff9feaea18e14389b6747aef82a4a7 (diff)
downloadffmpeg-fedec603db2b673d122244691c950df07df95222.tar.gz
Don't test for H264 encoding unless an encoder exists.
Originally committed as revision 14048 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c4
-rw-r--r--libavcodec/h264.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index c13d5b3cca..2be9a77fc8 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2726,9 +2726,9 @@ static void hl_decode_mb(H264Context *h){
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;
+ 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(!s->decode)
+ if(ENABLE_H264_ENCODER && !s->decode)
return;
if (is_complex)
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 6b76420ceb..2531e3a2e4 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -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
*/