OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d46c3b8
)
avutil/opt: allow max=min=0 for pixel formats
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 28 Feb 2014 22:55:34 +0000
(23:55 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 28 Feb 2014 23:31:38 +0000
(
00:31
+0100)
This is neccessary for maintaining ABI compatibility with FFmpeg 2.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c
patch
|
blob
|
history
diff --git
a/libavutil/opt.c
b/libavutil/opt.c
index
bff3b6e
..
652a2dd
100644
(file)
--- a/
libavutil/opt.c
+++ b/
libavutil/opt.c
@@
-327,6
+327,12
@@
static int set_string_fmt(void *obj, const AVOption *o, const char *val, uint8_t
min = FFMAX(o->min, -1);
max = FFMIN(o->max, fmt_nb-1);
+ // hack for compatibility with old ffmpeg
+ if(min == 0 && max == 0) {
+ min = -1;
+ max = fmt_nb-1;
+ }
+
if (fmt < min || fmt > max) {
av_log(obj, AV_LOG_ERROR,
"Value %d for parameter '%s' out of %s format range [%d - %d]\n",