Re: [FFmpeg-devel] [PATCH] avformat/movenc : Don't write sidx for empty urls

2018-11-28 Thread Jeyapal, Karthick
>On 11/28/18, 8:19 PM, "Moritz Barsnick" wrote: > >On Wed, Nov 28, 2018 at 20:10:11 +0530, Karthick J wrote: >> +// If url is an empty string("") don't write sidx atom. >> +if (s->url[0] == '\0') >> +return res; > >Probably clearer if you return 0, as res

Re: [FFmpeg-devel] [PATCH] avformat/movenc : Don't write sidx for empty urls

2018-11-28 Thread Moritz Barsnick
On Wed, Nov 28, 2018 at 20:10:11 +0530, Karthick J wrote: > +// If url is an empty string("") don't write sidx atom. > +if (s->url[0] == '\0') > +return res; Probably clearer if you return 0, as res hasn't been assigned anything up to this point, except its

[FFmpeg-devel] [PATCH] avformat/movenc : Don't write sidx for empty urls

2018-11-28 Thread Karthick J
When movenc is used by other segmenting muxers such as dashenc, url field is always empty. In such cases it is better to not write sidx, instead of throwing errors. --- libavformat/movenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index