Mercurial > libavcodec.hg
comparison mpegvideo.c @ 9828:6487152f17f2 libavcodec
Properly initialize AVFrames to default values in the MPEG decoder (fixes
the AVFrame pts when decoding MPEG 1 and 2 video)
author | lucabe |
---|---|
date | Tue, 09 Jun 2009 10:06:25 +0000 |
parents | 5d0f71ba8648 |
children | 9a670cfd1941 |
comparison
equal
deleted
inserted
replaced
9827:bca8ee90e5eb | 9828:6487152f17f2 |
---|---|
552 if(s->avctx->noise_reduction){ | 552 if(s->avctx->noise_reduction){ |
553 CHECKED_ALLOCZ(s->dct_offset, 2 * 64 * sizeof(uint16_t)) | 553 CHECKED_ALLOCZ(s->dct_offset, 2 * 64 * sizeof(uint16_t)) |
554 } | 554 } |
555 } | 555 } |
556 CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture)) | 556 CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture)) |
557 for(i = 0; i < MAX_PICTURE_COUNT; i++) { | |
558 avcodec_get_frame_defaults((AVFrame *)&s->picture[i]); | |
559 } | |
557 | 560 |
558 CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t)) | 561 CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t)) |
559 | 562 |
560 if(s->codec_id==CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)){ | 563 if(s->codec_id==CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)){ |
561 /* interlaced direct mode decoding tables */ | 564 /* interlaced direct mode decoding tables */ |