[FFmpeg-devel] [PATCH 1/2] Magic Lantern Video (MLV) demuxer

Clément Bœsch u at pkh.me
Fri Mar 21 14:27:13 CET 2014


On Fri, Mar 21, 2014 at 10:45:58PM +1100, Peter Ross wrote:
[...]
> +static void read_string(AVFormatContext *avctx, AVIOContext *pb, const char *tag, int size)
> +{

> +    char * value;
> +    value = av_malloc(size + 1);

nit+style: char *value = ...

> +    if (!value) {
> +        avio_skip(pb, size);
> +        return;
> +    }
> +    avio_read(pb, value, size);

> +    if (value[0]) {
> +        value[size] = 0;
> +        av_dict_set(&avctx->metadata, tag, value, AV_DICT_DONT_STRDUP_VAL);
> +    }

leak if not entering that block

[...]
> +static void scan_file(AVFormatContext *avctx, AVStream *vst, AVStream *ast, int file)
> +{
> +    MlvContext *mlv = avctx->priv_data;
> +    AVIOContext *pb = mlv->pb[file];
> +    while (!url_feof(pb)) {

> +        int type; 

trailing whitespace

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140321/90391a49/attachment.asc>


More information about the ffmpeg-devel mailing list