[Ffmpeg-devel] [PATCH] wrong use of ff_get_fourcc in mpjg.c
Reimar Doeffinger
Reimar.Doeffinger
Wed Feb 7 11:18:07 CET 2007
Hello,
attached patch fixes bug 739 by using the much more obvious to
understand MKBETAG.
I think this is not the first bug of this kind caused by this functions,
indicating it that it is flawed in so far as it has non-obvious
semantics, so may I suggest deprecating it?
In addition, if someone is bored, in mjpeg.c at least the fatal errors
should be fixed to use av_log instead of dprintf.
Greetings,
Reimar Doeffinger
-------------- next part --------------
Index: libavcodec/mjpeg.c
===================================================================
--- libavcodec/mjpeg.c (revision 7867)
+++ libavcodec/mjpeg.c (working copy)
@@ -2249,7 +2249,7 @@
skip_bits(&hgb, 32); /* reserved zeros */
- if (get_bits_long(&hgb, 32) != be2me_32(ff_get_fourcc("mjpg")))
+ if (get_bits_long(&hgb, 32) != MKBETAG('m','j','p','g'))
{
dprintf("not mjpeg-b (bad fourcc)\n");
return 0;
More information about the ffmpeg-devel
mailing list