Revision c53d2d90 libavcodec/h264.c

View differences:

libavcodec/h264.c
8039 8039
#ifdef CONFIG_H264_PARSER
8040 8040
static int h264_parse(AVCodecParserContext *s,
8041 8041
                      AVCodecContext *avctx,
8042
                      uint8_t **poutbuf, int *poutbuf_size,
8042
                      const uint8_t **poutbuf, int *poutbuf_size,
8043 8043
                      const uint8_t *buf, int buf_size)
8044 8044
{
8045 8045
    H264Context *h = s->priv_data;
......
8051 8051
    }else{
8052 8052
        next= find_frame_end(h, buf, buf_size);
8053 8053

  
8054
        if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
8054
        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
8055 8055
            *poutbuf = NULL;
8056 8056
            *poutbuf_size = 0;
8057 8057
            return buf_size;
......
8063 8063
        }
8064 8064
    }
8065 8065

  
8066
    *poutbuf = (uint8_t *)buf;
8066
    *poutbuf = buf;
8067 8067
    *poutbuf_size = buf_size;
8068 8068
    return next;
8069 8069
}
......
8303 8303
    if(s->flags&CODEC_FLAG_TRUNCATED){
8304 8304
        int next= find_frame_end(h, buf, buf_size);
8305 8305

  
8306
        if( ff_combine_frame(&s->parse_context, next, &buf, &buf_size) < 0 )
8306
        if( ff_combine_frame(&s->parse_context, next, (const uint8_t **)&buf, &buf_size) < 0 )
8307 8307
            return buf_size;
8308 8308
//printf("next:%d buf_size:%d last_index:%d\n", next, buf_size, s->parse_context.last_index);
8309 8309
    }

Also available in: Unified diff