[FFmpeg-devel] [PATCH] rmenc: more than 2 streams are not currently possible.

Michael Niedermayer michaelni at gmx.at
Sun Apr 29 05:10:27 CEST 2012


On Sun, Apr 29, 2012 at 12:14:47AM +0200, Reimar Döffinger wrote:
> It is possible that just extending the RMMuxContext.streams
> array would avoid it.
> It is also possible that two audio streams will fail to mux
> correctly as well, though at least it should not crash for
> this reason.
> I do not feel like checking either of these.
> This patch fixes trac issue #1022 (at least it makes it
> exit with a proper error message instead of crashing).
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> ---
>  libavformat/rmenc.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
> index 8a9d840..d6a50ea 100644
> --- a/libavformat/rmenc.c
> +++ b/libavformat/rmenc.c
> @@ -309,6 +309,11 @@ static int rm_write_header(AVFormatContext *s)
>      int n;
>      AVCodecContext *codec;
>  
> +    if (s->nb_streams > 2) {
> +        av_log(s, AV_LOG_ERROR, "At most 2 streams are currently supported for muxing in RM\n");
> +        return -1;

this maybe should be some more specific error code
otherwise

LGTM

thanks

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

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120429/c9bd7552/attachment.asc>


More information about the ffmpeg-devel mailing list