# HG changeset patch # User michael # Date 1235487858 0 # Node ID 963e3b76c7a69b8ccaeeebf66007ba030a039814 # Parent 9678d2a61b554dd8367abedc976074b14913ad8d Add AVFMT_VARIABLE_FPS to specify which muxers do not need duplicated frames. diff -r 9678d2a61b55 -r 963e3b76c7a6 avformat.h --- a/avformat.h Tue Feb 24 13:35:54 2009 +0000 +++ b/avformat.h Tue Feb 24 15:04:18 2009 +0000 @@ -265,6 +265,7 @@ #define AVFMT_NOTIMESTAMPS 0x0080 /**< Format does not need / have any timestamps. */ #define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */ #define AVFMT_TS_DISCONT 0x0200 /**< Format allows timestamp discontinuities. */ +#define AVFMT_VARIABLE_FPS 0x0400 /**< Format allows variable fps. */ typedef struct AVOutputFormat { const char *name; diff -r 9678d2a61b55 -r 963e3b76c7a6 avienc.c --- a/avienc.c Tue Feb 24 13:35:54 2009 +0000 +++ b/avienc.c Tue Feb 24 15:04:18 2009 +0000 @@ -606,4 +606,5 @@ avi_write_packet, avi_write_trailer, .codec_tag= (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, 0}, + .flags= AVFMT_VARIABLE_FPS, }; diff -r 9678d2a61b55 -r 963e3b76c7a6 matroskaenc.c --- a/matroskaenc.c Tue Feb 24 13:35:54 2009 +0000 +++ b/matroskaenc.c Tue Feb 24 15:04:18 2009 +0000 @@ -909,7 +909,7 @@ mkv_write_header, mkv_write_packet, mkv_write_trailer, - .flags = AVFMT_GLOBALHEADER, + .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, .codec_tag = (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, 0}, .subtitle_codec = CODEC_ID_TEXT, }; diff -r 9678d2a61b55 -r 963e3b76c7a6 movenc.c --- a/movenc.c Tue Feb 24 13:35:54 2009 +0000 +++ b/movenc.c Tue Feb 24 15:04:18 2009 +0000 @@ -1841,7 +1841,7 @@ mov_write_header, mov_write_packet, mov_write_trailer, - .flags = AVFMT_GLOBALHEADER, + .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, .codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0}, }; #endif @@ -1873,7 +1873,7 @@ mov_write_header, mov_write_packet, mov_write_trailer, - .flags = AVFMT_GLOBALHEADER, + .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, }; #endif diff -r 9678d2a61b55 -r 963e3b76c7a6 nutenc.c --- a/nutenc.c Tue Feb 24 13:35:54 2009 +0000 +++ b/nutenc.c Tue Feb 24 15:04:18 2009 +0000 @@ -820,6 +820,6 @@ write_header, write_packet, write_trailer, - .flags = AVFMT_GLOBALHEADER, + .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, .codec_tag= (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, ff_nut_subtitle_tags, 0}, };