[FFmpeg-devel] Regression problem

JULIAN GARDNER joolzg at btinternet.com
Wed Oct 8 11:28:47 CEST 2014




>________________________________
> From: JULIAN GARDNER <joolzg at btinternet.com>
>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
>Sent: Wednesday, 24 September 2014, 14:48
>Subject: Re: [FFmpeg-devel] Regression problem
> 
>
>> From: JULIAN GARDNER <joolzg at btinternet.com>
>
>>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
>>Sent: Tuesday, 23 September 2014, 13:37
>>Subject: Re: [FFmpeg-devel] Regression problem
>> 
>>
>>----- Original Message -----
>>> From: Michael Niedermayer <michaelni at gmx.at>
>>> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>>> Cc: 
>>> Sent: Tuesday, 23 September 2014, 12:24
>>> Subject: Re: [FFmpeg-devel] Regression problem
>>> 
>>> 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 ?
>>> 
>>
>>It happens with any png, i just created a simple 100x100 png in gimp and this also fails
>>
>>joolz
>>
>
>
>Started debgging the code and found that the return from the pngdec.c decode_frame is ok, data decoded and got_packet set to 1, image size if correct.
>
>So looks like it is somewhere further down the chain.
>



just noticed someone else has posted what seems to me to be the same regression bug,

"unable to decode png file."

From my debugging my problem also fails after the file has been decoded correctly.

joolz


More information about the ffmpeg-devel mailing list