[Libav-user] EXR channel support?

Gonzalo Garramuno ggarra13 at gmail.com
Sat Feb 15 22:16:10 CET 2014


On 15/02/14 18:09, Paul B Mahol wrote:
> On 2/15/14, Gonzalo Garramuno <ggarra13 at gmail.com> wrote:
>> On 15/02/14 04:56, Paul B Mahol wrote:
>>> Also the layer option is not used at all....
>>>
>> Here's a patch with layer being printed that segfaults.  It seems the
>> field is never initialized nor parsed, even though command-line works.
>>
> AVClass is still missing....
AVClass is there. See:


+static const AVClass exr_class = {
+    .class_name = "EXR",
+    .item_name  = av_default_item_name,
+    .option     = options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
+

@@ -1275,4 +1298,5 @@ AVCodec ff_exr_decoder = {
      .close              = decode_end,
      .decode             = decode_frame,
      .capabilities       = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS | 
CODEC_CAP_SLICE_THREADS,
+    .priv_class         = &exr_class,
  };

I put the code under valgrind and I can see that the crash is in the opt 
code.  See the trace of valgrind:

valgrind ffmpeg_g -layer RenderLayer.Color -i 
/media/Linux/anims/sub2/sub.%04d.exr test.mov

==9798==
==9798== Invalid read of size 8
==9798==    at 0x6CF1C08: av_opt_next (in 
/usr/local/lib/libavutil.so.52.63.101)
==9798==    by 0x6CF1E9A: av_opt_free (in 
/usr/local/lib/libavutil.so.52.63.101)
==9798==    by 0x5714EB2: avcodec_close (in 
/usr/local/lib/libavcodec.so.55.52.101)
==9798==    by 0x542353F: avformat_find_stream_info (in 
/usr/local/lib/libavformat.so.55.32.101)
==9798==    by 0x410A7D: open_input_file (ffmpeg_opt.c:861)
==9798==    by 0x40F346: open_files.isra.7 (ffmpeg_opt.c:2587)
==9798==    by 0x4174B9: ffmpeg_parse_options (ffmpeg_opt.c:2624)
==9798==    by 0x407630: main (ffmpeg.c:3576)
==9798==  Address 0x9847850 is 16 bytes inside a block of size 624 free'd
==9798==    at 0x4C2A82E: free (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9798==    by 0x6CF0AAB: av_freep (in 
/usr/local/lib/libavutil.so.52.63.101)
==9798==    by 0x541BA18: ??? (in /usr/local/lib/libavformat.so.55.32.101)
==9798==    by 0x54234C7: avformat_find_stream_info (in 
/usr/local/lib/libavformat.so.55.32.101)
==9798==    by 0x410A7D: open_input_file (ffmpeg_opt.c:861)
==9798==    by 0x40F346: open_files.isra.7 (ffmpeg_opt.c:2587)
==9798==    by 0x4174B9: ffmpeg_parse_options (ffmpeg_opt.c:2624)
==9798==    by 0x407630: main (ffmpeg.c:3576)
==9798==



More information about the Libav-user mailing list