[FFmpeg-devel] [PATCH] vobsub in mov support
Reimar Döffinger
Reimar.Doeffinger
Thu Apr 2 20:16:34 CEST 2009
On Thu, Apr 02, 2009 at 10:46:13AM -0700, Baptiste Coudurier wrote:
> > The code basically looks like this now:
> > search audio id
> > if (!is VIDEO && id found)
> > is AUDIO
> > else if (!is AUDIO) {
> > search video id
> > if (id found) is VIDEO
> > else if (is DATA) {
> > search sub id
> > if (id found) is SUB
> > }
> > }
> >
> > While IMHO what was _meant_ is
> > if (is AUDIO or is DATA) {
> > search audio id
> > if (id found) is AUDIO
> > }
> > if (is VIDEO or is DATA) {
> > search video id
> > if (id found) is VIDEO
> > }
>
> This does not work because "raw " is used both in video and audio.
> In this case handler has precedence.
Huh? If a handler is given, the codec_type will be set accordingly.
My example pseudo-code will _only_ override a CODEC_TYPE_DATA
There should be _no_ change at all for files with only video and audio...
I was just thinking that my suggestion was much more "obvious" since it
is easy to see that audio, video and subtitles are all treated the same
and it does not pointlessly test for an audio id match in the
CODEC_TYPE_VIDEO video case.
> > I just meant to say, if I am missing something why my second version
> > would not be correct that should be explained by a comment.
> > If it is correct, are you interested in a patch to change it like that?
> > Note that I think the current code will do funny stuff for a (probably
> > invalid file) where e.g. handler == "vide" and format == "QDM2", you will
> > end up with a video stream with CODEC_ID_QDM2, which I think is about
> > the silliest way to handle it :-P ...
>
> Well, the question is how a video stream with the same "fourc" as QDM2
> audio should be handled ? According to the usage of the "raw " fourcc,
> it appears that the handler as precedence.
You misunderstood me, but it does not matter since it was all nonsense
what I wrote, current code will correctly end up with CODEC_ID_NONE.
More information about the ffmpeg-devel
mailing list