[FFmpeg-devel] Regression problem
Michael Niedermayer
michaelni at gmx.at
Tue Sep 23 12:24:39 CEST 2014
On Tue, Sep 23, 2014 at 09:27:57AM +0100, JULIAN GARDNER wrote:
> I seem to be having problems using the ff_load_image routine, with a git pulled build from the beginning of the week, which used to work but is now giving me "failed to decode image file", and this is on a png that has been in use for over a year,
>
> The code is is based on VSRC_TESTSRC with an addition call to this code
>
> static int load_image(uint8_t **image_data, int *w, int *h, int *stride,
> const char *filename, void *log_ctx)
> {
> int ret;
> enum AVPixelFormat pix_fmt;
> uint8_t *src_data[4], *dst_data[4];
> int src_linesize[4], dst_linesize[4];
>
> av_log( NULL, AV_LOG_WARNING, "load_image %s\n", filename);
>
> /* load image from file */
> if ((ret = ff_load_image(src_data, src_linesize, w, h, &pix_fmt, filename, log_ctx)) < 0)
> return ret;
>
> if ((ret = ff_scale_image(dst_data, dst_linesize, *w, *h, PIXEL_FORMAT,
> src_data, src_linesize, *w, *h, pix_fmt,
> log_ctx)) < 0)
> goto end;
>
> *stride = dst_linesize[0];
>
> /* copy image_data to a newly allocated array */
> *image_data = av_malloc(*stride * *h);
> if (!*image_data)
> ret = AVERROR(ENOMEM);
> av_image_copy_plane(*image_data, *stride, dst_data[0], dst_linesize[0], *w*4, *h);
> end:
> av_free(src_data[0]);
> av_free(dst_data[0]);
>
> return ret;
> }
>
>
> This used to work but now as I have said give the error message about not being able to decode
>
> There is nothing in the log, even with as "-loglevel debug"
>
> load_image /home/encoder/images/Logo640x360.png
> [AVIOContext @ 0x7fdcf8002580] Statistics: 3713 bytes read, 0 seeks
> [libx264 @ 0x2c63320] frame= 322 QP=12.00 NAL=2 Slice:P Poc:144 I:15 P:524 SKIP:381 size=14355 bytes
> [Parsed_osd_0 @ 0x2c3b200] Failed to decode image from file
> [Parsed_osd_0 @ 0x2c3b200] Error loading image file '/home/encoder/images/Logo640x360.png'
how can this be reproduced ?
can you share the png file ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140923/21e5c7d3/attachment.asc>
More information about the ffmpeg-devel
mailing list