[FFmpeg-cvslog] avopt: fix examples to match the same style about default values as the actual code .

Michael Niedermayer git at videolan.org
Wed Sep 5 18:48:50 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep  5 18:40:21 2012 +0200| [7666828c44b5505a0988260965b1f44d9e253cb4] | committer: Michael Niedermayer

avopt: fix examples to match the same style about default values as the actual code.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/opt.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavutil/opt.h b/libavutil/opt.h
index ea22616..5d7f62c 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -64,7 +64,7 @@
  *
  * static const AVOption options[] = {
  *   { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt),
- *     AV_OPT_TYPE_INT, { -1 }, INT_MIN, INT_MAX },
+ *     AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX },
  *   { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt),
  *     AV_OPT_TYPE_STRING },
  *   { "test_bin", "This is a test option of binary type.", offsetof(test_struct, bin_opt),
@@ -123,7 +123,7 @@
  *      } child_struct;
  *      static const AVOption child_opts[] = {
  *          { "test_flags", "This is a test option of flags type.",
- *            offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { 0 }, INT_MIN, INT_MAX },
+ *            offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX },
  *          { NULL },
  *      };
  *      static const AVClass child_class = {
@@ -170,8 +170,8 @@
  *      above, put the following into the child_opts array:
  *      @code
  *      { "test_flags", "This is a test option of flags type.",
- *        offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { 0 }, INT_MIN, INT_MAX, "test_unit" },
- *      { "flag1", "This is a flag with value 16", 0, AV_OPT_TYPE_CONST, { 16 }, 0, 0, "test_unit" },
+ *        offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX, "test_unit" },
+ *      { "flag1", "This is a flag with value 16", 0, AV_OPT_TYPE_CONST, {.i64 = 16 }, 0, 0, "test_unit" },
  *      @endcode
  *
  * @section avoptions_use Using AVOptions



More information about the ffmpeg-cvslog mailing list