[libav-bugs] [Bug 580] New: av_guess_codec ignores parameters and returns surprising values

bugzilla at libav.org bugzilla at libav.org
Mon Oct 28 03:28:31 CET 2013


           Summary: av_guess_codec ignores parameters and returns
                    surprising values
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: superjoe30 at gmail.com

Example case:

avconv -i test.wav test.ogg

This will produce a test.ogg which is FLAC. This should be vorbis.

More importantly, this code:

AVOutputFormat *oformat = av_guess_format(NULL, "test.ogg", NULL);
enum AVCodecID codec_id = av_guess_codec(oformat, "vorbis", "test.ogg", NULL,

AVCodec *codec = avcodec_find_encoder(codec_id);

codec will be the FLAC codec, but it should be the vorbis codec.

I took a quick peek at the implementation of av_guess_codec and it is
completely ignoring filename, codec_short_name, and mime_type parameters.

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list