diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/h261.c')
-rw-r--r-- | src/libffmpeg/libavcodec/h261.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libffmpeg/libavcodec/h261.c b/src/libffmpeg/libavcodec/h261.c index c6218c8b9..e56978e61 100644 --- a/src/libffmpeg/libavcodec/h261.c +++ b/src/libffmpeg/libavcodec/h261.c @@ -264,6 +264,7 @@ void ff_h261_encode_mb(MpegEncContext * s, h->previous_mba = h->current_mba; if(HAS_CBP(h->mtype)){ + assert(cbp>0); put_bits(&s->pb,h261_cbp_tab[cbp-1][1],h261_cbp_tab[cbp-1][0]); } for(i=0; i<6; i++) { @@ -846,6 +847,7 @@ static int h261_decode_gob(H261Context *h){ return -1; } +#ifdef CONFIG_H261_PARSER static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const uint8_t *buf, int buf_size){ int vop_found, i, j; uint32_t state; @@ -899,6 +901,7 @@ static int h261_parse(AVCodecParserContext *s, *poutbuf_size = buf_size; return next; } +#endif /** * returns the number of bytes consumed for building the current frame @@ -921,8 +924,8 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict = data; #ifdef DEBUG - printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); - printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); + av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size); + av_log(avctx, AV_LOG_DEBUG, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); #endif s->flags= avctx->flags; s->flags2= avctx->flags2; @@ -1038,6 +1041,7 @@ AVCodec h261_decoder = { CODEC_CAP_DR1, }; +#ifdef CONFIG_H261_PARSER AVCodecParser h261_parser = { { CODEC_ID_H261 }, sizeof(ParseContext), @@ -1045,3 +1049,4 @@ AVCodecParser h261_parser = { h261_parse, ff_parse_close, }; +#endif |