History

lavf: document that passing valid timestamps to muxers is now mandatory

Also, extend the documentation about setting timestamps.

Anton Khirnov committed 11 years ago

Commit 21ab6fd1 parent 5c30ae11 file · +21 −8Browse files

Unified · Split

libavformat/avformat.h+21−8
@@ -1629,10 +1629,17 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options); · 1628 unmodified lines
16291629 * <br>
16301630 * Packet's @ref AVPacket.stream_index "stream_index" field must be
16311631 * set to the index of the corresponding stream in @ref
1632− * AVFormatContext.streams "s->streams". It is very strongly
1633− * recommended that timing information (@ref AVPacket.pts "pts", @ref
1634− * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to
1635− * correct values.
1632+ * AVFormatContext.streams "s->streams".
1633+ * <br>
1634+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts")
1635+ * must be set to correct values in the stream's timebase (unless the
1636+ * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then
1637+ * they can be set to AV_NOPTS_VALUE).
1638+ * The dts for subsequent packets passed to this function must be strictly
1639+ * increasing when compared in their respective timebases (unless the
1640+ * output format is flagged with the AVFMT_TS_NONSTRICT, then they
1641+ * merely have to be nondecreasing). @ref AVPacket.duration
1642+ * "duration") should also be set if known.
16361643 * @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush
16371644 *
16381645 * @see av_interleaved_write_frame()
@@ -1662,10 +1669,16 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); · 23 unmodified lines
16621669 * <br>
16631670 * Packet's @ref AVPacket.stream_index "stream_index" field must be
16641671 * set to the index of the corresponding stream in @ref
1665− * AVFormatContext.streams "s->streams". It is very strongly
1666− * recommended that timing information (@ref AVPacket.pts "pts", @ref
1667− * AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to
1668− * correct values.
1672+ * AVFormatContext.streams "s->streams".
1673+ * <br>
1674+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts")
1675+ * must be set to correct values in the stream's timebase (unless the
1676+ * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then
1677+ * they can be set to AV_NOPTS_VALUE).
1678+ * The dts for subsequent packets in one stream must be strictly
1679+ * increasing (unless the output format is flagged with the
1680+ * AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing).
1681+ * @ref AVPacket.duration "duration") should also be set if known.
16691682 *
16701683 * @return 0 on success, a negative AVERROR on error. Libavformat will always
16711684 * take care of freeing the packet, even if this function fails.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t