comparison h263dec.c @ 3185:333e016c2c8a libavcodec

cleanup picture / debug output code
author michael
date Fri, 10 Mar 2006 20:40:52 +0000
parents 8d1b2cc2a75b
children 19620d64a239
comparison
equal deleted inserted replaced
3184:68d7896a08e4 3185:333e016c2c8a
764 764
765 MPV_frame_end(s); 765 MPV_frame_end(s);
766 766
767 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); 767 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
768 assert(s->current_picture.pict_type == s->pict_type); 768 assert(s->current_picture.pict_type == s->pict_type);
769 if(s->pict_type==B_TYPE || s->low_delay){ 769 if (s->pict_type == B_TYPE || s->low_delay) {
770 *pict= *(AVFrame*)&s->current_picture; 770 *pict= *(AVFrame*)s->current_picture_ptr;
771 } else if (s->last_picture_ptr != NULL) {
772 *pict= *(AVFrame*)s->last_picture_ptr;
773 }
774
775 if(s->last_picture_ptr || s->low_delay){
776 *data_size = sizeof(AVFrame);
771 ff_print_debug_info(s, pict); 777 ff_print_debug_info(s, pict);
772 } else {
773 *pict= *(AVFrame*)&s->last_picture;
774 if(pict)
775 ff_print_debug_info(s, pict);
776 } 778 }
777 779
778 /* Return the Picture timestamp as the frame number */ 780 /* Return the Picture timestamp as the frame number */
779 /* we substract 1 because it is added on utils.c */ 781 /* we substract 1 because it is added on utils.c */
780 avctx->frame_number = s->picture_number - 1; 782 avctx->frame_number = s->picture_number - 1;
781 783
782 /* don't output the last pic after seeking */
783 if(s->last_picture_ptr || s->low_delay)
784 *data_size = sizeof(AVFrame);
785 #ifdef PRINT_FRAME_TIME 784 #ifdef PRINT_FRAME_TIME
786 av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time); 785 av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time);
787 #endif 786 #endif
788 787
789 return get_consumed_bytes(s, buf_size); 788 return get_consumed_bytes(s, buf_size);