comparison h263dec.c @ 9027:3c141db76660 libavcodec

Approved hunk from the AVHWaccel patch by Gwenole Beauchesne.
author michael
date Tue, 24 Feb 2009 18:24:56 +0000
parents 15a3df8c01fd
children 0f95e4f0a3f5
comparison
equal deleted inserted replaced
9026:19bbd1457372 9027:3c141db76660
132 * returns the number of bytes consumed for building the current frame 132 * returns the number of bytes consumed for building the current frame
133 */ 133 */
134 static int get_consumed_bytes(MpegEncContext *s, int buf_size){ 134 static int get_consumed_bytes(MpegEncContext *s, int buf_size){
135 int pos= (get_bits_count(&s->gb)+7)>>3; 135 int pos= (get_bits_count(&s->gb)+7)>>3;
136 136
137 if(s->divx_packed){ 137 if(s->divx_packed || s->avctx->hwaccel){
138 //we would have to scan through the whole buf to handle the weird reordering ... 138 //we would have to scan through the whole buf to handle the weird reordering ...
139 return buf_size; 139 return buf_size;
140 }else if(s->flags&CODEC_FLAG_TRUNCATED){ 140 }else if(s->flags&CODEC_FLAG_TRUNCATED){
141 pos -= s->parse_context.last_index; 141 pos -= s->parse_context.last_index;
142 if(pos<0) pos=0; // padding is not really read so this might be -1 142 if(pos<0) pos=0; // padding is not really read so this might be -1