[FFmpeg-cvslog] pict_type: add a value for unknown/none.

Martin Matuska git at videolan.org
Tue Jun 28 13:43:37 CEST 2011


ffmpeg | branch: release/0.7 | Martin Matuska <mm at FreeBSD.org> | Tue Jun 28 13:26:56 2011 +0200| [ce993ce791cd01916d79e315d1558b016d2770df] | committer: Michael Niedermayer

pict_type: add a value for unknown/none.

In commit bebe72f4a05d338e04ae9ca1e9c6b72749b488aa, the enum AV_PICTURE_TYPE_* was introduced. There are still places in the code where pict_type is used as an integer and there is a case where "pict_type = 0" with the explanation "let ffmpeg decide what to do". The new enum does not know a value of 0 and C++ will fail if compiling such programs anyway as it is refered as an int (and you cannot patch them properly).
(cherry picked from commit 512933671409f9f88cc9fdfc8f29525d32240bab)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce993ce791cd01916d79e315d1558b016d2770df
---

 libavutil/avutil.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 05b45ce..59b59db 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -112,7 +112,8 @@ enum AVMediaType {
 #define FF_API_OLD_IMAGE_NAMES (LIBAVUTIL_VERSION_MAJOR < 51)
 #endif
 enum AVPictureType {
-    AV_PICTURE_TYPE_I = 1, ///< Intra
+    AV_PICTURE_TYPE_NONE = 0, ///< Undefined
+    AV_PICTURE_TYPE_I,     ///< Intra
     AV_PICTURE_TYPE_P,     ///< Predicted
     AV_PICTURE_TYPE_B,     ///< Bi-dir predicted
     AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG4



More information about the ffmpeg-cvslog mailing list