[libav-bugs] [Bug 883] New: The nut encoder can choose the wrong codec tag

bugzilla at libav.org bugzilla at libav.org
Thu Sep 3 17:05:17 CEST 2015


https://bugzilla.libav.org/show_bug.cgi?id=883

            Bug ID: 883
           Summary: The nut encoder can choose the wrong codec tag
           Product: Libav
           Version: 11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: ---
         Component: libavformat
          Assignee: bugzilla at libav.org
          Reporter: _ at habnab.it

In my specific case, I was using RGB24 UTVIDEO, and the nut encoder wrote out
the codec tag for RGBA UTVIDEO instead. 

https://code.videolan.org/libav/libav/blob/v11.2/libavformat/nutenc.c#L420-447
are the relevant lines from the version of libav I was using, but this appears
to affect git HEAD too. Specifically, av_codec_get_tag returns the first
matching tag, and nut defers to ff_codec_bmp_tags for some codec tags. Since 
https://code.videolan.org/libav/libav/blob/v11.2/libavformat/riff.c#L328-329
only lists AV_CODEC_ID_UTVIDEO, the first tag (ULRA, for RGBA) is chosen. Since
it isn't a RAWVIDEO codec, the nut encoder writes out that first tag instead of
consulting codec->codec_tag, which is the correct value ULRG. gdb shows:

(gdb) p (char[4])codec->codec_tag
$38 = "ULRG"
(gdb) p (char[4])codec_tag
$39 = "ULRA"

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20150903/110c2f22/attachment.html>


More information about the libav-bugs mailing list