[FFmpeg-devel] camera files (no name)

Peter Ross pross
Wed Feb 4 10:54:53 CET 2009


On Tue, Feb 03, 2009 at 04:27:51PM -0500, nicolas martin wrote:
> Attached is a patch to support the nc4600 camera files.
>

Comments below.
 
> Index: libavformat/ncdec.c
> ===================================================================
> --- libavformat/ncdec.c	(revision 0)
> +++ libavformat/ncdec.c	(revision 0)
> @@ -0,0 +1,92 @@
> +/*
> + * NC camera feed demuxer
> + * Copyright (c) 2009  Nicolas Martin (martinic at iro dot umontreal dot ca), Edouard Auvinet

The norm is to place each contributor on a seperate line.

> +static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> +    int size;
> +
> +    uint32_t state=-1;
> +    while(!url_feof(s->pb) && state != NC_VIDEO_FLAG)
> +        state = (state<<8) + get_byte(s->pb);
> +
> +    get_byte(s->pb);
> +    size = get_le16(s->pb);
> +    url_fskip(s->pb, 9);
> +
> +    if (size <= 0) {
> +        av_log(s, AV_LOG_DEBUG, "Wrong size : %d\n", size);

While size may be zero, it will never be less then zero, thus
the debug statement is pointless.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090204/cd2013fe/attachment.pgp>



More information about the ffmpeg-devel mailing list