Mercurial > libavcodec.hg
comparison vc9.c @ 3185:333e016c2c8a libavcodec
cleanup picture / debug output code
author | michael |
---|---|
date | Fri, 10 Mar 2006 20:40:52 +0000 |
parents | 961af1358c7f |
children |
comparison
equal
deleted
inserted
replaced
3184:68d7896a08e4 | 3185:333e016c2c8a |
---|---|
2604 | 2604 |
2605 MPV_frame_end(s); | 2605 MPV_frame_end(s); |
2606 | 2606 |
2607 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); | 2607 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); |
2608 assert(s->current_picture.pict_type == s->pict_type); | 2608 assert(s->current_picture.pict_type == s->pict_type); |
2609 if(s->pict_type==B_TYPE || s->low_delay){ | 2609 |
2610 *pict= *(AVFrame*)&s->current_picture; | 2610 if (s->pict_type == B_TYPE || s->low_delay) { |
2611 *pict= *(AVFrame*)s->current_picture_ptr; | |
2612 } else if (s->last_picture_ptr != NULL) { | |
2613 *pict= *(AVFrame*)s->last_picture_ptr; | |
2614 } | |
2615 | |
2616 if(s->last_picture_ptr || s->low_delay){ | |
2617 *data_size = sizeof(AVFrame); | |
2611 ff_print_debug_info(s, pict); | 2618 ff_print_debug_info(s, pict); |
2612 } else { | |
2613 *pict= *(AVFrame*)&s->last_picture; | |
2614 if(pict) | |
2615 ff_print_debug_info(s, pict); | |
2616 } | 2619 } |
2617 | 2620 |
2618 /* Return the Picture timestamp as the frame number */ | 2621 /* Return the Picture timestamp as the frame number */ |
2619 /* we substract 1 because it is added on utils.c */ | 2622 /* we substract 1 because it is added on utils.c */ |
2620 avctx->frame_number = s->picture_number - 1; | 2623 avctx->frame_number = s->picture_number - 1; |
2621 | |
2622 /* dont output the last pic after seeking */ | |
2623 if(s->last_picture_ptr || s->low_delay) | |
2624 *data_size = sizeof(AVFrame); | |
2625 | 2624 |
2626 av_log(avctx, AV_LOG_DEBUG, "Consumed %i/%i bits\n", | 2625 av_log(avctx, AV_LOG_DEBUG, "Consumed %i/%i bits\n", |
2627 get_bits_count(&s->gb), buf_size*8); | 2626 get_bits_count(&s->gb), buf_size*8); |
2628 | 2627 |
2629 /* Fake consumption of all data */ | 2628 /* Fake consumption of all data */ |