[MPlayer-dev-eng] [PATCHES] VOBsub cleanup

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 22 11:31:39 CET 2011


On Sat, Jan 22, 2011 at 11:23:35AM +0100, Clément Bœsch wrote:
> On Sat, Jan 22, 2011 at 11:12:06AM +0100, Reimar Döffinger wrote:
> > On Fri, Jan 21, 2011 at 10:50:42PM +0100, Clément Bœsch wrote:
> > > Ok, changed by passing the vo_vobsub instance (I can't make the function
> > > return it because of the error handling).
> > 
> > You'll have to explain that. I only see you use 0 and -1, so why can't
> > you return a vo_vobsub or NULL respectively?
> 
> load_vob_subtitle could return the vobsub instance on sucess and NULL on
> failure, but not being able to load a vobsub does not mean there is an
> error. There is two cases where the loading raise an error: if vobsub name
> is stated but the file does not exist, or allocation error. In the other
> cases, if vobsub_open fails, this just means the file wasn't found, but it
> does not mean there is an error.

It is a bit inconsistent with load_subtitles which never returns any error.
Feel free to go ahead as it is, but it might be a good idea to look if you
can get more consistency into this.


More information about the MPlayer-dev-eng mailing list