Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-06-17 Thread Nicolas George
Mark Thompson (2018-06-17): > There is AVERROR_FILTER_NOT_FOUND - while it isn't currently returned > from lavfi, it does sound exactly right for this. It is not exactly right for this, because this can be ENOMEM too. Furthermore, this error code is really wrong, because this function does not

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-06-17 Thread Mark Thompson
On 16/06/18 13:39, Carl Eugen Hoyos wrote: > 2018-02-05 3:05 GMT+01:00, James Almer : >> On 2/4/2018 10:33 PM, Carl Eugen Hoyos wrote: >>> Hi! >>> >>> OOM is unlikely as a failure for avfilter_graph_alloc_filter(), the >>> patch avoids a surprising error if a filter was not found. >>> >>> Please

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-06-16 Thread Carl Eugen Hoyos
2018-02-05 3:05 GMT+01:00, James Almer : > On 2/4/2018 10:33 PM, Carl Eugen Hoyos wrote: >> Hi! >> >> OOM is unlikely as a failure for avfilter_graph_alloc_filter(), the >> patch avoids a surprising error if a filter was not found. >> >> Please comment, Carl Eugen >> >> >>

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-05 Thread James Almer
On 2/5/2018 1:20 PM, Nicolas George wrote: > James Almer (2018-02-05): >> If it takes a parameter like the type of "something" you want to alloc >> then yes, I'd support that policy as there's no way to prevent the >> argument passed from being invalid, so NULL in that case will not mean >> ENOMEM

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-05 Thread Nicolas George
James Almer (2018-02-05): > If it takes a parameter like the type of "something" you want to alloc > then yes, I'd support that policy as there's no way to prevent the > argument passed from being invalid, so NULL in that case will not mean > ENOMEM but EINVAL. Ok. > But if there's no parameters

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-05 Thread James Almer
On 2/5/2018 12:22 PM, Nicolas George wrote: > James Almer (2018-02-04): >> -1 is not acceptable for a public function that states it returns an >> AVERROR value on failure. >> If the issue is that avfilter_graph_alloc_filter() may fail because of >> both OOM and an invalid value for filter, then

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-05 Thread Nicolas George
James Almer (2018-02-04): > -1 is not acceptable for a public function that states it returns an > AVERROR value on failure. > If the issue is that avfilter_graph_alloc_filter() may fail because of > both OOM and an invalid value for filter, then I'm more inclined to use > AVERROR_UNKNOWN here

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-04 Thread James Almer
On 2/4/2018 11:05 PM, James Almer wrote: > On 2/4/2018 10:33 PM, Carl Eugen Hoyos wrote: >> Hi! >> >> OOM is unlikely as a failure for avfilter_graph_alloc_filter(), the >> patch avoids a surprising error if a filter was not found. >> >> Please comment, Carl Eugen >> >> >>

Re: [FFmpeg-devel] [PATCH]lavfi/avfiltergraph: Do not return ENOMEM if filter is missing

2018-02-04 Thread James Almer
On 2/4/2018 10:33 PM, Carl Eugen Hoyos wrote: > Hi! > > OOM is unlikely as a failure for avfilter_graph_alloc_filter(), the > patch avoids a surprising error if a filter was not found. > > Please comment, Carl Eugen > > > 0001-lavfi-avfiltergraph-Do-not-return-ENOMEM-if-filterch.patch > > >