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

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


--- Comment #3 from Anton Khirnov <anton at khirnov.net> 2013-10-28 09:10:03 CET ---
(In reply to comment #2)
> (In reply to comment #1)
> > What makes you think it should be vorbis.
> This is not the main issue, but the fact that .flac the canonical FLAC
> extension and .ogg is the canonical vorbis extension.

I would disagree with the part about .ogg. You wouldn't call .mka 'the
canonical AAC extension either'. That said, it would probably be a good idea to
change the default codec for ogg to vorbis if libavorbis is available.

> > In this case, the "problem" (if you can call it that) is not in the
> > av_guess_codec function, but in the ogg muxer, which declares FLAC as the
> > default audio codec for itself.
> No, the problem is certainly that av_guess_codec is ignoring the codec short
> name parameter. In the example I gave above, I pass "vorbis" to av_guess_codec,
> which ignores the parameter and returns the flac encoder anyway.

Well, since that function is not really documented, we can only guess what
short_name is supposed to mean. IMO it wouldn't make much sense for it to be
the _codec_ name, since then it'd just duplicate the relevant function from
libavcodec. So I would assume that the author's intention was that it's the
_muxer_ name.

In any case, patches documenting and improving that function are welcome.

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