# HG changeset patch # User cehoyos # Date 1235086559 0 # Node ID cdd8fa4a362ab63cd461929c60f3bfd9a7b20da9 # Parent 48c89edff557b3404093825448f2e020188faf30 Add convergence_duration to AVCodecParserContext. Patch by Ivan Schreter, schreter gmx net diff -r 48c89edff557 -r cdd8fa4a362a avcodec.h --- a/avcodec.h Thu Feb 19 23:08:23 2009 +0000 +++ b/avcodec.h Thu Feb 19 23:35:59 2009 +0000 @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 17 +#define LIBAVCODEC_VERSION_MINOR 18 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -3033,6 +3033,23 @@ * will be used. */ int key_frame; + + /** + * Time difference in stream time base units from the pts of this + * packet to the point at which the output from the decoder has converged + * independent from the availability of previous frames. That is, the + * frames are virtually identical no matter if decoding started from + * the very first frame or from this keyframe. + * Is AV_NOPTS_VALUE if unknown. + * This field is not the display duration of the current frame. + * + * The purpose of this field is to allow seeking in streams that have no + * keyframes in the conventional sense. It corresponds to the + * recovery point SEI in H.264 and match_time_delta in NUT. It is also + * essential for some types of subtitle streams to ensure that all + * subtitles are correctly displayed after seeking. + */ + int64_t convergence_duration; } AVCodecParserContext; typedef struct AVCodecParser { diff -r 48c89edff557 -r cdd8fa4a362a parser.c --- a/parser.c Thu Feb 19 23:08:23 2009 +0000 +++ b/parser.c Thu Feb 19 23:35:59 2009 +0000 @@ -74,6 +74,7 @@ s->fetch_timestamp=1; s->pict_type = FF_I_TYPE; s->key_frame = -1; + s->convergence_duration = AV_NOPTS_VALUE; return s; }