Mercurial > libavcodec.hg
comparison h264.c @ 2547:c5781912ad8a libavcodec
improved detection of "AVC1" style H.264 patch by (Mns Rullgrd <mru inprovide com>)
author | michael |
---|---|
date | Sun, 06 Mar 2005 19:40:12 +0000 |
parents | 34b0996cc10d |
children | bca31bc0cbae |
comparison
equal
deleted
inserted
replaced
2546:621cc4a94695 | 2547:c5781912ad8a |
---|---|
2630 s->low_delay= 1; | 2630 s->low_delay= 1; |
2631 avctx->pix_fmt= PIX_FMT_YUV420P; | 2631 avctx->pix_fmt= PIX_FMT_YUV420P; |
2632 | 2632 |
2633 decode_init_vlc(h); | 2633 decode_init_vlc(h); |
2634 | 2634 |
2635 if(avctx->codec_tag != 0x31637661 && avctx->codec_tag != 0x31435641) // avc1 | 2635 if(avctx->extradata_size > 0 && avctx->extradata && |
2636 h->is_avc = 0; | 2636 *(char *)avctx->extradata == 1){ |
2637 else { | 2637 av_log(avctx, AV_LOG_INFO, "assuming AVC1 format\n"); |
2638 if((avctx->extradata_size == 0) || (avctx->extradata == NULL)) { | |
2639 av_log(avctx, AV_LOG_ERROR, "AVC codec requires avcC data\n"); | |
2640 return -1; | |
2641 } | |
2642 h->is_avc = 1; | 2638 h->is_avc = 1; |
2643 h->got_avcC = 0; | 2639 h->got_avcC = 0; |
2640 } else { | |
2641 h->is_avc = 0; | |
2644 } | 2642 } |
2645 | 2643 |
2646 return 0; | 2644 return 0; |
2647 } | 2645 } |
2648 | 2646 |