[FFmpeg-devel] [Patch] Download dash content with byte range info

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Nov 16 00:37:28 EET 2017

2017-11-15 22:00 GMT+01:00 Colin NG <colin_ng at hotmail.com>:
> This patch is partial fix for ticket 6658 (Dash demuxer segfault).

> +static struct fragment * get_Fragment(char *range) {
> +    struct fragment * seg =  av_mallocz(sizeof(struct fragment));

Please make it (code-style):
... fragment *get_Fragment...
... fragment *seg =...

> +    if (!seg)
> +        goto finish;


You can "return NULL;" but since this is a little misleading,
it may be better to return AVERROR(ENOMEM) and instead
of the existing check for NULL below, check for "< 0".

Carl Eugen

More information about the ffmpeg-devel mailing list