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

Colin NG colin_ng at hotmail.com
Thu Nov 16 02:59:51 EET 2017


Made change suggested by Carl and add some minor fixes.


________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of Carl Eugen Hoyos <ceffmpeg at gmail.com>
Sent: November 15, 2017 5:37 PM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] [Patch] Download dash content with byte range info

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;

No.

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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
ffmpeg-devel Info Page<http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
ffmpeg.org
This list is about FFmpeg development discussions and patches; but not for bug-reports. Please read the Code-of-conduct. To see the collection of prior postings to ...


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff5.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171116/8a854ae8/attachment.txt>


More information about the ffmpeg-devel mailing list