summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-07-10 10:25:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-07-10 10:25:11 +0000
commitebd62a2402cfbd7a780276fd05695b96ec9e1521 (patch)
tree9be5fa66e9b4fd5db2f087b6d9bb837c37fbe4e2
parentef5e74bbfdd8198e6e9eb082a299a77d401c5464 (diff)
return the number of consumed bytes instead of 0 or buf_size
Originally committed as revision 731 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h263dec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 83b76dbe9b..c766c7cbeb 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -172,20 +172,20 @@ uint64_t time= rdtsc();
return -1;
}
- if(ret==FRAME_SKIPED) return 0;
+ if(ret==FRAME_SKIPED) return (get_bits_count(&s->gb)+7)>>3;
/* skip if the header was thrashed */
if (ret < 0){
fprintf(stderr, "header damaged\n");
return -1;
}
/* skip b frames if we dont have reference frames */
- if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return 0;
+ if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return buf_size;
/* skip b frames if we are in a hurry */
- if(s->hurry_up && s->pict_type==B_TYPE) return 0;
+ if(s->hurry_up && s->pict_type==B_TYPE) return buf_size;
if(s->next_p_frame_damaged){
if(s->pict_type==B_TYPE)
- return 0;
+ return buf_size;
else
s->next_p_frame_damaged=0;
}
@@ -447,7 +447,7 @@ uint64_t time= rdtsc();
#ifdef PRINT_FRAME_TIME
printf("%Ld\n", rdtsc()-time);
#endif
- return buf_size;
+ return (get_bits_count(&s->gb)+7)>>3;
}
AVCodec mpeg4_decoder = {