[FFmpeg-cvslog] avformat: Fix max value of AV_OPT_TYPE_VIDEO_RATE

Michael Niedermayer git at videolan.org
Thu Jun 9 10:40:11 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Jun  9 05:00:52 2016 +0200| [4888932c4d3ac68c26f44d7adf1e22e0d7ed8808] | committer: Michael Niedermayer

avformat: Fix max value of AV_OPT_TYPE_VIDEO_RATE

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/bintext.c     |    2 +-
 libavformat/img2dec.c     |    2 +-
 libavformat/rawdec.c      |    2 +-
 libavformat/rawvideodec.c |    2 +-
 libavformat/tty.c         |    2 +-
 libavformat/v210.c        |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavformat/bintext.c b/libavformat/bintext.c
index 3a24c81..a264fd1 100644
--- a/libavformat/bintext.c
+++ b/libavformat/bintext.c
@@ -326,7 +326,7 @@ static int read_packet(AVFormatContext *s,
 static const AVOption options[] = {
     { "linespeed", "set simulated line speed (bytes per second)", OFFSET(chars_per_frame), AV_OPT_TYPE_INT, {.i64 = 6000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM},
     { "video_size", "set video size, such as 640x480 or hd720.", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
-    { "framerate", "set framerate (frames per second)", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
+    { "framerate", "set framerate (frames per second)", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
     { NULL },
 };
 
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 8dfb813..1b0e608 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -561,7 +561,7 @@ static int img_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
 #define OFFSET(x) offsetof(VideoDemuxData, x)
 #define DEC AV_OPT_FLAG_DECODING_PARAM
 const AVOption ff_img_options[] = {
-    { "framerate",    "set the video framerate",             OFFSET(framerate),    AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0,   DEC },
+    { "framerate",    "set the video framerate",             OFFSET(framerate),    AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX,   DEC },
     { "loop",         "force loop over input file sequence", OFFSET(loop),         AV_OPT_TYPE_BOOL,   {.i64 = 0   }, 0, 1,       DEC },
 
     { "pattern_type", "set pattern type",                    OFFSET(pattern_type), AV_OPT_TYPE_INT,    {.i64=PT_DEFAULT}, 0,       INT_MAX, DEC, "pattern_type"},
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 5aad1c1..876a6e6 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -107,7 +107,7 @@ int ff_raw_data_read_header(AVFormatContext *s)
 #define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
 #define DEC AV_OPT_FLAG_DECODING_PARAM
 const AVOption ff_rawvideo_options[] = {
-    { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC},
+    { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC},
     { NULL },
 };
 
diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
index b037aea..8bde22c 100644
--- a/libavformat/rawvideodec.c
+++ b/libavformat/rawvideodec.c
@@ -89,7 +89,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
 static const AVOption rawvideo_options[] = {
     { "video_size", "set frame size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
     { "pixel_format", "set pixel format", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = "yuv420p"}, 0, 0, DEC },
-    { "framerate", "set frame rate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC },
+    { "framerate", "set frame rate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
     { NULL },
 };
 
diff --git a/libavformat/tty.c b/libavformat/tty.c
index ba7aebd..b407645 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -138,7 +138,7 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
 static const AVOption options[] = {
     { "chars_per_frame", "", offsetof(TtyDemuxContext, chars_per_frame), AV_OPT_TYPE_INT, {.i64 = 6000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM},
     { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
-    { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC },
+    { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
     { NULL },
 };
 
diff --git a/libavformat/v210.c b/libavformat/v210.c
index 24ce042..a90bd36 100644
--- a/libavformat/v210.c
+++ b/libavformat/v210.c
@@ -83,7 +83,7 @@ static int v210_read_packet(AVFormatContext *s, AVPacket *pkt)
 #define DEC AV_OPT_FLAG_DECODING_PARAM
 static const AVOption v210_options[] = {
     { "video_size", "set frame size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
-    { "framerate", "set frame rate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, DEC },
+    { "framerate", "set frame rate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
     { NULL },
 };
 



More information about the ffmpeg-cvslog mailing list