X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh263dec.c;h=48f8240bc81286543cbd81a84168a97466ef5527;hb=599b4c6efddaed33b1667c386b34b07729ba732b;hp=a19e55c6ac3518e797f024582995bb7a7b3ff582;hpb=2a11952f457658d58303c8e5b4e10fb4599eef4f;p=ffmpeg diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index a19e55c6ac3..48f8240bc81 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -91,6 +91,8 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) break; case CODEC_ID_VC1: case CODEC_ID_WMV3: + case CODEC_ID_VC1IMAGE: + case CODEC_ID_WMV3IMAGE: s->h263_pred = 1; s->msmpeg4_version=6; avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; @@ -705,8 +707,8 @@ intrax8_decoded: MPV_frame_end(s); -assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); -assert(s->current_picture.pict_type == s->pict_type); + assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); + assert(s->current_picture.f.pict_type == s->pict_type); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { *pict= *(AVFrame*)s->current_picture_ptr; } else if (s->last_picture_ptr != NULL) { @@ -722,19 +724,18 @@ assert(s->current_picture.pict_type == s->pict_type); av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); #endif - return (ret && avctx->error_recognition >= FF_ER_EXPLODE)?ret:get_consumed_bytes(s, buf_size); + return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size); } AVCodec ff_h263_decoder = { - "h263", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H263, - sizeof(MpegEncContext), - ff_h263_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, + .name = "h263", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H263, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_h263_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, .flush= ff_mpeg_flush, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),