Mercurial > libavcodec.hg
comparison h263dec.c @ 1183:03b97d87dcdd libavcodec
10l (use before malloc)
author | michaelni |
---|---|
date | Sat, 12 Apr 2003 15:00:32 +0000 |
parents | fea03d2c4946 |
children | 126f766bc4c5 |
comparison
equal
deleted
inserted
replaced
1182:38e8b8f331cb | 1183:03b97d87dcdd |
---|---|
641 printf("qscale=%d\n", s->qscale); | 641 printf("qscale=%d\n", s->qscale); |
642 #endif | 642 #endif |
643 | 643 |
644 ff_er_frame_start(s); | 644 ff_er_frame_start(s); |
645 | 645 |
646 //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type | |
647 //which isnt available before MPV_frame_start() | |
648 if (s->msmpeg4_version==5){ | |
649 if(ff_wmv2_decode_secondary_picture_header(s) < 0) | |
650 return -1; | |
651 } | |
652 | |
646 /* decode each macroblock */ | 653 /* decode each macroblock */ |
647 s->mb_x=0; | 654 s->mb_x=0; |
648 s->mb_y=0; | 655 s->mb_y=0; |
649 | 656 |
650 decode_slice(s); | 657 decode_slice(s); |
651 while(s->mb_y<s->mb_height && s->gb.size_in_bits - get_bits_count(&s->gb)>16){ | 658 while(s->mb_y<s->mb_height){ |
652 if(s->msmpeg4_version){ | 659 if(s->msmpeg4_version){ |
653 if(s->mb_x!=0 || (s->mb_y%s->slice_height)!=0) | 660 if(s->mb_x!=0 || (s->mb_y%s->slice_height)!=0 || get_bits_count(&s->gb) > s->gb.size_in_bits) |
654 break; | 661 break; |
655 }else{ | 662 }else{ |
656 if(ff_h263_resync(s)<0) | 663 if(ff_h263_resync(s)<0) |
657 break; | 664 break; |
658 } | 665 } |
731 ff_print_debug_info(s, s->current_picture_ptr); | 738 ff_print_debug_info(s, s->current_picture_ptr); |
732 } else { | 739 } else { |
733 *pict= *(AVFrame*)&s->last_picture; | 740 *pict= *(AVFrame*)&s->last_picture; |
734 ff_print_debug_info(s, s->last_picture_ptr); | 741 ff_print_debug_info(s, s->last_picture_ptr); |
735 } | 742 } |
736 | |
737 | 743 |
738 /* Return the Picture timestamp as the frame number */ | 744 /* Return the Picture timestamp as the frame number */ |
739 /* we substract 1 because it is added on utils.c */ | 745 /* we substract 1 because it is added on utils.c */ |
740 avctx->frame_number = s->picture_number - 1; | 746 avctx->frame_number = s->picture_number - 1; |
741 | 747 |