[FFmpeg-devel] [PATCH] add missing break in av_set_number

Reimar Döffinger Reimar.Doeffinger
Thu Dec 13 11:55:29 CET 2007


Hello,
I guess it makes no difference currently, but there is a break missing
that causes av_set_number to always return NULL for
FF_OPT_TYPE_RATIONAL instead of the AVOption pointer.
Attached patch should fix it.

Greetings,
Reimar D?ffinger
-------------- next part --------------
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index c11dcd3..52f4ea9 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -69,6 +69,7 @@ static const AVOption *av_set_number(void *obj, const char *name, double num, in
     case FF_OPT_TYPE_RATIONAL:
         if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den};
         else                *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24);
+        break;
     default:
         return NULL;
     }



More information about the ffmpeg-devel mailing list