[FFmpeg-devel] [Toy] Aura 1 and 2 decoder

compn tempn
Mon Mar 16 14:24:58 CET 2009


On Mon, 16 Mar 2009 09:32:59 +0200, Kostya wrote:
>+    /* sanity check the buffer size: A buffer has 3x16-bytes tables
>+     * followed by (height) lines each with 3 bytes to represent groups
>+     * of 4 pixels. Thus, the total size of the buffer ought to be:
>+     *    (3 * 16) + height * (width * 3 / 4) */
>+    if (buf_size != 48 + s->height * s->width) {
>+      av_log(avctx, AV_LOG_ERROR, "ffmpeg: cyuv: got a buffer with %d bytes when %d were expected\n",
>+        buf_size,
>+        48 + s->height * s->width);
>+      return -1;
>+    }

is it a good idea to quit if something unexpected comes along?
btw i created a cyuv file which throws this error:
http://samples.mplayerhq.hu/V-codecs/CYUV.AVI

[cyuv @ 00E10540]ffmpeg: cyuv: got a buffer with 153600 bytes when
57648 were expected
Error while decoding frame!

not sure if its a valid file. created with ms vfw 1.1

-compn




More information about the ffmpeg-devel mailing list