aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-04 19:09:40 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-02-17 11:27:42 -0500
commitbb7701684c7170dfd5f33a3c7d827265844619f2 (patch)
treedf7673729b38d7e611948d5c3d98aa79ac57f45d /libavformat/avformat.h
parentcb70a93ca1e7fae1b5dfb65ad149d311a65206a4 (diff)
downloadffmpeg-bb7701684c7170dfd5f33a3c7d827265844619f2.tar.gz
lavf: Document the codec context initialization
During remuxing avcodec_copy_context() is discouraged as certain fields (such as codec_tag) could reflect invalid values between input and output contextes.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 0994c8075e..aa11cff2f3 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -198,6 +198,10 @@
* be set to the timebase that the caller desires to use for this stream (note
* that the timebase actually used by the muxer can be different, as will be
* described later).
+ * - It is advised to manually initialize only the relevant fields in
+ * AVCodecContext, rather than using @ref avcodec_copy_context() during
+ * remuxing: there is no guarantee that the codec context values remain valid
+ * for both input and output format contexts.
* - The caller may fill in additional information, such as @ref
* AVFormatContext.metadata "global" or @ref AVStream.metadata "per-stream"
* metadata, @ref AVFormatContext.chapters "chapters", @ref