[FFmpeg-cvslog] r17570 - in trunk: libavcodec/avcodec.h libavformat/utils.c
cehoyos
subversion
Tue Feb 24 21:17:05 CET 2009
Author: cehoyos
Date: Tue Feb 24 21:17:02 2009
New Revision: 17570
Log:
Change duration computation to use time_base instead of TB/2.
Patch by Ivan Schreter, schreter gmx net
Modified:
trunk/libavcodec/avcodec.h
trunk/libavformat/utils.c
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h Tue Feb 24 20:04:43 2009 (r17569)
+++ trunk/libavcodec/avcodec.h Tue Feb 24 21:17:02 2009 (r17570)
@@ -3098,12 +3098,9 @@ typedef struct AVCodecParserContext {
* It signals, how much longer the frame duration of the current frame
* is compared to normal frame duration.
*
- * frame_duration = (2 + repeat_pict) / (2*fps)
+ * frame_duration = (1 + repeat_pict) * time_base
*
* It is used by codecs like H.264 to display telecined material.
- *
- * @note This field can also be set to -1 for half-frame duration in case
- * of field pictures.
*/
int repeat_pict; /* XXX: Put it back in AVCodecContext. */
int64_t pts; /* pts of the current frame */
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Tue Feb 24 20:04:43 2009 (r17569)
+++ trunk/libavformat/utils.c Tue Feb 24 21:17:02 2009 (r17570)
@@ -680,10 +680,7 @@ static void compute_frame_duration(int *
*pnum = st->codec->time_base.num;
*pden = st->codec->time_base.den;
if (pc && pc->repeat_pict) {
- // NOTE: repeat_pict can be also -1 for half-frame durations,
- // e.g., in H.264 interlaced field picture stream
- *pden *= 2;
- *pnum = (*pnum) * (2 + pc->repeat_pict);
+ *pnum = (*pnum) * (1 + pc->repeat_pict);
}
}
break;
More information about the ffmpeg-cvslog
mailing list