[FFmpeg-devel] [PATCH] Reset audio_disable and video_disable for new input files

Michael Niedermayer michaelni
Mon Jun 11 18:02:09 CEST 2007


Hi

On Mon, Jun 11, 2007 at 01:54:20PM +0200, Luca Abeni wrote:
> Hi all,
> 
> let's assume I want to save the video track from an input file input.avi 
> into a file out1.avi, and I want to save the audio track into a 
> different otuput file out2.avi.
> 
> The only way I found to do this is
> ffmpeg -i input.avi -vcodec copy -an out1.avi -i input.avi -acodec copy 
> -vn out2.avi
> but this unfortunately fails, because when the second input is read 
> audio_disable is not reset to 0. Is this done by purpose? If not, the 
> attached patch fixes the problem.
[...]
> Index: ffmpeg/ffmpeg.c
> ===================================================================
> --- ffmpeg.orig/ffmpeg.c	2007-06-11 12:48:41.000000000 +0200
> +++ ffmpeg/ffmpeg.c	2007-06-11 12:49:29.000000000 +0200
> @@ -2662,6 +2662,9 @@
>      video_channel = 0;
>  
>      rate_emu = 0;
> +
> +    audio_disable = 0;
> +    video_disable = 0;
>  }

i dont think this will be enough because *_disable is used prior to that
to set AVStream.discard

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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/20070611/3e8b7331/attachment.pgp>



More information about the ffmpeg-devel mailing list