[vlc-devel] [PATCH] lib: media_track: don't return an empty list

Rémi Denis-Courmont remi at remlab.net
Tue Jun 16 17:10:45 CEST 2020


Le tiistaina 16. kesäkuuta 2020, 13.47.29 EEST Romain Vimont a écrit :
> On Tue, Jun 16, 2020 at 12:44:41PM +0200, Marvin Scholz wrote:
> > Hi,
> > I am not sure it's a good idea to have no way to tell the error case
> > apart from the case when there are no items, as some applications
> > might want to handle that differently?
> > Opinions welcome, maybe it's just me.
> 
> I agree, the caller should be able to distinguish between alloc error
> and empty list.

Yes, of course. Though I'd make a reasonable efforts to avoid errors in 
scenarii where there's no reasonable ways for the caller to handle them.

(typically by allocating objects ealier and then using reference counting or 
whatever)

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list