Mercurial > libavcodec.hg
comparison h261dec.c @ 5127:4dbe6578f811 libavcodec
misc spelling fixes
author | diego |
---|---|
date | Tue, 12 Jun 2007 09:29:25 +0000 |
parents | 5b63f62602fa |
children | 0244bba24b43 |
comparison
equal
deleted
inserted
replaced
5126:7982b376b58a | 5127:4dbe6578f811 |
---|---|
530 /** | 530 /** |
531 * returns the number of bytes consumed for building the current frame | 531 * returns the number of bytes consumed for building the current frame |
532 */ | 532 */ |
533 static int get_consumed_bytes(MpegEncContext *s, int buf_size){ | 533 static int get_consumed_bytes(MpegEncContext *s, int buf_size){ |
534 int pos= get_bits_count(&s->gb)>>3; | 534 int pos= get_bits_count(&s->gb)>>3; |
535 if(pos==0) pos=1; //avoid infinite loops (i doubt thats needed but ...) | 535 if(pos==0) pos=1; //avoid infinite loops (i doubt that is needed but ...) |
536 if(pos+10>buf_size) pos=buf_size; // oops ;) | 536 if(pos+10>buf_size) pos=buf_size; // oops ;) |
537 | 537 |
538 return pos; | 538 return pos; |
539 } | 539 } |
540 | 540 |
563 if(!s->context_initialized){ | 563 if(!s->context_initialized){ |
564 if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix | 564 if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix |
565 return -1; | 565 return -1; |
566 } | 566 } |
567 | 567 |
568 //we need to set current_picture_ptr before reading the header, otherwise we cant store anyting im there | 568 //we need to set current_picture_ptr before reading the header, otherwise we cannot store anyting im there |
569 if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ | 569 if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ |
570 int i= ff_find_unused_picture(s, 0); | 570 int i= ff_find_unused_picture(s, 0); |
571 s->current_picture_ptr= &s->picture[i]; | 571 s->current_picture_ptr= &s->picture[i]; |
572 } | 572 } |
573 | 573 |
578 av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); | 578 av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); |
579 return -1; | 579 return -1; |
580 } | 580 } |
581 | 581 |
582 if (s->width != avctx->coded_width || s->height != avctx->coded_height){ | 582 if (s->width != avctx->coded_width || s->height != avctx->coded_height){ |
583 ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat | 583 ParseContext pc= s->parse_context; //FIXME move this demuxing hack to libavformat |
584 s->parse_context.buffer=0; | 584 s->parse_context.buffer=0; |
585 MPV_common_end(s); | 585 MPV_common_end(s); |
586 s->parse_context= pc; | 586 s->parse_context= pc; |
587 } | 587 } |
588 if (!s->context_initialized) { | 588 if (!s->context_initialized) { |