[Ffmpeg-cvslog] r5998 - trunk/libavcodec/h261.c

michael subversion
Mon Aug 14 20:17:14 CEST 2006


Author: michael
Date: Mon Aug 14 20:17:14 2006
New Revision: 5998

Modified:
   trunk/libavcodec/h261.c

Log:
fix codec timebase and timestamps


Modified: trunk/libavcodec/h261.c
==============================================================================
--- trunk/libavcodec/h261.c	(original)
+++ trunk/libavcodec/h261.c	Mon Aug 14 20:17:14 2006
@@ -781,7 +781,14 @@
     }
 
     /* temporal reference */
-    s->picture_number = get_bits(&s->gb, 5); /* picture timestamp */
+    i= get_bits(&s->gb, 5); /* picture timestamp */
+    if(i < (s->picture_number&31))
+        i += 32;
+    s->picture_number = (s->picture_number&~31) + i;
+
+    s->avctx->time_base= (AVRational){1001, 30000};
+    s->current_picture.pts= s->picture_number;
+
 
     /* PTYPE starts here */
     skip_bits1(&s->gb); /* split screen off */
@@ -998,10 +1005,6 @@
     *pict= *(AVFrame*)s->current_picture_ptr;
     ff_print_debug_info(s, pict);
 
-    /* Return the Picture timestamp as the frame number */
-    /* we substract 1 because it is added on utils.c    */
-    avctx->frame_number = s->picture_number - 1;
-
     *data_size = sizeof(AVFrame);
 
     return get_consumed_bytes(s, buf_size);




More information about the ffmpeg-cvslog mailing list