[FFmpeg-devel] [PATCH] fix DV muxer stream count check

Michael Niedermayer michaelni
Sat May 12 17:21:40 CEST 2007


Hi

On Sat, May 12, 2007 at 04:53:09PM +0200, Reimar D?ffinger wrote:
> Hello,
> currently it is possible to pass the DV demuxer three audio streams
> causing an access beyond a buffer or to pass it two video streams in
> which case it will just ignore one.
> Attached patch fixes this.
> In addition I would also suggest replacing all those "goto bail_out;" by
> "return NULL" since they both do the same - while I gotos have their
> use, I think in this case they are useless and confusing.
> 
> Greetings,
> Reimar D?ffinger

> Index: libavformat/dvenc.c
> ===================================================================
> --- libavformat/dvenc.c	(revision 9003)
> +++ libavformat/dvenc.c	(working copy)
> @@ -298,9 +298,11 @@
>      for (i=0; i<s->nb_streams; i++) {
>           switch (s->streams[i]->codec->codec_type) {
>           case CODEC_TYPE_VIDEO:
> +             if (vst) return NULL; 
>                 vst = s->streams[i];

trailing whitespace and the indention is wrong (and yes iam aware that
the existing code is also inconsistently indented but yours has 13 spaces
which considering consistent indention would either be indented by 1 level
of 13 spaces or 13 levels of 1 space ...)

actual patch appoval/rejection left to our dv maintainer roman

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070512/bf2cea78/attachment.pgp>



More information about the ffmpeg-devel mailing list