if(avctx->codec_tag != 0x31637661 && avctx->codec_tag != 0x31435641) h->is_avc = 0; else { if((avctx->extradata_size == 0) || (avctx->extradata == NULL)) { av_log(avctx, AV_LOG_ERROR, "AVC codec requires avcC data\n"); return -1; }
if(avctx->extradata_size > 0 && avctx->extradata && *(char *)avctx->extradata == 1){ av_log(avctx, AV_LOG_INFO, "assuming AVC1 format\n");
static int decode_init(AVCodecContext *avctx){    H264Context *h= avctx->priv_data;    MpegEncContext * const s = &h->s;    MPV_decode_defaults(s);        s->avctx = avctx;    common_init(h);    s->out_format = FMT_H264;    s->workaround_bugs= avctx->workaround_bugs;    // set defaults//    s->decode_mb= ff_h263_decode_mb;    s->low_delay= 1;    avctx->pix_fmt= PIX_FMT_YUV420P;    decode_init_vlc(h);        if(avctx->codec_tag != 0x31637661 && avctx->codec_tag != 0x31435641) // avc1        h->is_avc = 0;    else {        if((avctx->extradata_size == 0) || (avctx->extradata == NULL)) {            av_log(avctx, AV_LOG_ERROR, "AVC codec requires avcC data\n");            return -1;        }        h->is_avc = 1;        h->got_avcC = 0;    }    return 0;}