|
|
@ -2606,23 +2606,22 @@ static int vc9_decode_frame(AVCodecContext *avctx, |
|
|
|
|
|
|
|
|
|
|
|
assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); |
|
|
|
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.pict_type == s->pict_type); |
|
|
|
if(s->pict_type==B_TYPE || s->low_delay){ |
|
|
|
|
|
|
|
*pict= *(AVFrame*)&s->current_picture; |
|
|
|
if (s->pict_type == B_TYPE || s->low_delay) { |
|
|
|
|
|
|
|
*pict= *(AVFrame*)s->current_picture_ptr; |
|
|
|
|
|
|
|
} else if (s->last_picture_ptr != NULL) { |
|
|
|
|
|
|
|
*pict= *(AVFrame*)s->last_picture_ptr; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(s->last_picture_ptr || s->low_delay){ |
|
|
|
|
|
|
|
*data_size = sizeof(AVFrame); |
|
|
|
ff_print_debug_info(s, pict); |
|
|
|
ff_print_debug_info(s, pict); |
|
|
|
} else { |
|
|
|
|
|
|
|
*pict= *(AVFrame*)&s->last_picture; |
|
|
|
|
|
|
|
if(pict) |
|
|
|
|
|
|
|
ff_print_debug_info(s, pict); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Return the Picture timestamp as the frame number */ |
|
|
|
/* Return the Picture timestamp as the frame number */ |
|
|
|
/* we substract 1 because it is added on utils.c */ |
|
|
|
/* we substract 1 because it is added on utils.c */ |
|
|
|
avctx->frame_number = s->picture_number - 1; |
|
|
|
avctx->frame_number = s->picture_number - 1; |
|
|
|
|
|
|
|
|
|
|
|
/* dont output the last pic after seeking */ |
|
|
|
|
|
|
|
if(s->last_picture_ptr || s->low_delay) |
|
|
|
|
|
|
|
*data_size = sizeof(AVFrame); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Consumed %i/%i bits\n", |
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Consumed %i/%i bits\n", |
|
|
|
get_bits_count(&s->gb), buf_size*8); |
|
|
|
get_bits_count(&s->gb), buf_size*8); |
|
|
|
|
|
|
|
|
|
|
|