aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-15 22:11:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-15 22:11:43 +0200
commit20526f2e2f58cb226e9891aec7d7e438a7ddb6d2 (patch)
tree42b57f0395b81a30dc496e215c3ebe933101e794
parent4ed3a01d717f120ba6881815ad6c40ad3f625825 (diff)
parent9af7e8045e3e63ab39adedae9a7c11b1c410af26 (diff)
downloadffmpeg-20526f2e2f58cb226e9891aec7d7e438a7ddb6d2.tar.gz
Merge commit '9af7e8045e3e63ab39adedae9a7c11b1c410af26'
* commit '9af7e8045e3e63ab39adedae9a7c11b1c410af26': lavc: Clarify the behaviour of dimension and format context fields Conflicts: libavcodec/avcodec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/avcodec.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4aeb57aed4..6fdeb4f6ff 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1405,21 +1405,31 @@ typedef struct AVCodecContext {
/* video only */
/**
* picture width / height.
+ *
+ * @note Those fields may not match the values of the last
+ * AVFrame outputted by avcodec_decode_video2 due frame
+ * reordering.
+ *
* - encoding: MUST be set by user.
* - decoding: May be set by the user before opening the decoder if known e.g.
* from the container. Some decoders will require the dimensions
* to be set by the caller. During decoding, the decoder may
- * overwrite those values as required.
+ * overwrite those values as required while parsing the data.
*/
int width, height;
/**
* Bitstream width / height, may be different from width/height e.g. when
* the decoded frame is cropped before being output or lowres is enabled.
+ *
+ * @note Those field may not match the value of the last
+ * AVFrame outputted by avcodec_decode_video2 due frame
+ * reordering.
+ *
* - encoding: unused
* - decoding: May be set by the user before opening the decoder if known
* e.g. from the container. During decoding, the decoder may
- * overwrite those values as required.
+ * overwrite those values as required while parsing the data.
*/
int coded_width, coded_height;
@@ -1438,8 +1448,14 @@ typedef struct AVCodecContext {
* Pixel format, see AV_PIX_FMT_xxx.
* May be set by the demuxer if known from headers.
* May be overridden by the decoder if it knows better.
+ *
+ * @note This field may not match the value of the last
+ * AVFrame outputted by avcodec_decode_video2 due frame
+ * reordering.
+ *
* - encoding: Set by user.
- * - decoding: Set by user if known, overridden by libavcodec if known
+ * - decoding: Set by user if known, overridden by libavcodec while
+ * parsing the data.
*/
enum AVPixelFormat pix_fmt;