Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
James Zern authored on 2011/05/27 03:19:04... | ... |
@@ -13,6 +13,10 @@ libavutil: 2011-04-18 |
13 | 13 |
|
14 | 14 |
API changes, most recent first: |
15 | 15 |
|
16 |
+2012-05-xx - xxxxxxx - lavf 54.3.0 |
|
17 |
+ Add AVFMT_TS_NONSTRICT format flag to indicate that a muxer supports |
|
18 |
+ non-increasing monotone timestamps. |
|
19 |
+ |
|
16 | 20 |
2012-05-15 - lavfi 2.17.0 |
17 | 21 |
Add support for audio filters |
18 | 22 |
ac71230/a2cd9be - add video/audio buffer sink in a new installed |
... | ... |
@@ -351,6 +351,9 @@ typedef struct AVProbeData { |
351 | 351 |
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fallback to generic search */ |
352 | 352 |
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */ |
353 | 353 |
#define AVFMT_ALLOW_FLUSH 0x10000 /**< Format allows flushing. If not set, the muxer will not receive a NULL packet in the write_packet function. */ |
354 |
+#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly |
|
355 |
+ increasing timestamps, but they must |
|
356 |
+ still be monotonic */ |
|
354 | 357 |
|
355 | 358 |
/** |
356 | 359 |
* @addtogroup lavf_encoding |
... | ... |
@@ -373,7 +376,8 @@ typedef struct AVOutputFormat { |
373 | 373 |
/** |
374 | 374 |
* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE, |
375 | 375 |
* AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, |
376 |
- * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH |
|
376 |
+ * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, |
|
377 |
+ * AVFMT_TS_NONSTRICT |
|
377 | 378 |
*/ |
378 | 379 |
int flags; |
379 | 380 |
|
... | ... |
@@ -488,5 +488,6 @@ AVOutputFormat ff_flv_muxer = { |
488 | 488 |
.codec_tag = (const AVCodecTag* const []){ |
489 | 489 |
flv_video_codec_ids, flv_audio_codec_ids, 0 |
490 | 490 |
}, |
491 |
- .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, |
|
491 |
+ .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS | |
|
492 |
+ AVFMT_TS_NONSTRICT, |
|
492 | 493 |
}; |
... | ... |
@@ -1305,7 +1305,8 @@ AVOutputFormat ff_matroska_muxer = { |
1305 | 1305 |
.write_header = mkv_write_header, |
1306 | 1306 |
.write_packet = mkv_write_packet, |
1307 | 1307 |
.write_trailer = mkv_write_trailer, |
1308 |
- .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, |
|
1308 |
+ .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS | |
|
1309 |
+ AVFMT_TS_NONSTRICT, |
|
1309 | 1310 |
.codec_tag = (const AVCodecTag* const []){ |
1310 | 1311 |
ff_codec_bmp_tags, ff_codec_wav_tags, 0 |
1311 | 1312 |
}, |
... | ... |
@@ -1326,7 +1327,8 @@ AVOutputFormat ff_webm_muxer = { |
1326 | 1326 |
.write_header = mkv_write_header, |
1327 | 1327 |
.write_packet = mkv_write_packet, |
1328 | 1328 |
.write_trailer = mkv_write_trailer, |
1329 |
- .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, |
|
1329 |
+ .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS | |
|
1330 |
+ AVFMT_TS_NONSTRICT, |
|
1330 | 1331 |
}; |
1331 | 1332 |
#endif |
1332 | 1333 |
|
... | ... |
@@ -1346,7 +1348,7 @@ AVOutputFormat ff_matroska_audio_muxer = { |
1346 | 1346 |
.write_header = mkv_write_header, |
1347 | 1347 |
.write_packet = mkv_write_packet, |
1348 | 1348 |
.write_trailer = mkv_write_trailer, |
1349 |
- .flags = AVFMT_GLOBALHEADER, |
|
1349 |
+ .flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT, |
|
1350 | 1350 |
.codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 }, |
1351 | 1351 |
}; |
1352 | 1352 |
#endif |
... | ... |
@@ -106,6 +106,6 @@ AVOutputFormat ff_framemd5_muxer = { |
106 | 106 |
.video_codec = CODEC_ID_RAWVIDEO, |
107 | 107 |
.write_header = ff_framehash_write_header, |
108 | 108 |
.write_packet = framemd5_write_packet, |
109 |
- .flags = AVFMT_VARIABLE_FPS, |
|
109 |
+ .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT, |
|
110 | 110 |
}; |
111 | 111 |
#endif |
... | ... |
@@ -144,6 +144,6 @@ AVOutputFormat ff_smjpeg_muxer = { |
144 | 144 |
.write_header = smjpeg_write_header, |
145 | 145 |
.write_packet = smjpeg_write_packet, |
146 | 146 |
.write_trailer = smjpeg_write_trailer, |
147 |
- .flags = AVFMT_GLOBALHEADER, |
|
147 |
+ .flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT, |
|
148 | 148 |
.codec_tag = (const AVCodecTag *const []){ ff_codec_smjpeg_video_tags, ff_codec_smjpeg_audio_tags, 0 }, |
149 | 149 |
}; |
... | ... |
@@ -513,6 +513,7 @@ AVOutputFormat ff_swf_muxer = { |
513 | 513 |
.write_header = swf_write_header, |
514 | 514 |
.write_packet = swf_write_packet, |
515 | 515 |
.write_trailer = swf_write_trailer, |
516 |
+ .flags = AVFMT_TS_NONSTRICT, |
|
516 | 517 |
}; |
517 | 518 |
#endif |
518 | 519 |
#if CONFIG_AVM2_MUXER |
... | ... |
@@ -526,5 +527,6 @@ AVOutputFormat ff_avm2_muxer = { |
526 | 526 |
.write_header = swf_write_header, |
527 | 527 |
.write_packet = swf_write_packet, |
528 | 528 |
.write_trailer = swf_write_trailer, |
529 |
+ .flags = AVFMT_TS_NONSTRICT, |
|
529 | 530 |
}; |
530 | 531 |
#endif |
... | ... |
@@ -2962,7 +2962,9 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ |
2962 | 2962 |
pkt->dts= st->pts_buffer[0]; |
2963 | 2963 |
} |
2964 | 2964 |
|
2965 |
- if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){ |
|
2965 |
+ if (st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && |
|
2966 |
+ ((!(s->oformat->flags & AVFMT_TS_NONSTRICT) && |
|
2967 |
+ st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)) { |
|
2966 | 2968 |
av_log(s, AV_LOG_ERROR, |
2967 | 2969 |
"Application provided invalid, non monotonically increasing dts to muxer in stream %d: %"PRId64" >= %"PRId64"\n", |
2968 | 2970 |
st->index, st->cur_dts, pkt->dts); |
... | ... |
@@ -30,7 +30,7 @@ |
30 | 30 |
#include "libavutil/avutil.h" |
31 | 31 |
|
32 | 32 |
#define LIBAVFORMAT_VERSION_MAJOR 54 |
33 |
-#define LIBAVFORMAT_VERSION_MINOR 2 |
|
33 |
+#define LIBAVFORMAT_VERSION_MINOR 3 |
|
34 | 34 |
#define LIBAVFORMAT_VERSION_MICRO 0 |
35 | 35 |
|
36 | 36 |
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
... | ... |
@@ -216,6 +216,7 @@ AVOutputFormat ff_wav_muxer = { |
216 | 216 |
.write_header = wav_write_header, |
217 | 217 |
.write_packet = wav_write_packet, |
218 | 218 |
.write_trailer = wav_write_trailer, |
219 |
+ .flags = AVFMT_TS_NONSTRICT, |
|
219 | 220 |
.codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 }, |
220 | 221 |
.priv_class = &wav_muxer_class, |
221 | 222 |
}; |