From ae360fea7d7886442c79895ff1d9bc2055bd90f9 Mon Sep 17 00:00:00 2001 From: nareix Date: Tue, 12 Jul 2016 13:29:00 +0800 Subject: [PATCH] avconv: add Options.SupportedCodecTypes --- av/avconv/avconv.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/av/avconv/avconv.go b/av/avconv/avconv.go index 96a0588..6c954a1 100644 --- a/av/avconv/avconv.go +++ b/av/avconv/avconv.go @@ -33,6 +33,7 @@ type Option struct { } type Options struct { + OutputCodecTypes []av.CodecType } type Demuxer struct { @@ -40,7 +41,6 @@ type Demuxer struct { streams []av.CodecData Options Demuxer av.Demuxer - Muxer av.Muxer } func (self *Demuxer) Close() (err error) { @@ -77,7 +77,7 @@ func (self *Demuxer) prepare() (err error) { } */ - supports := self.Muxer.SupportedCodecTypes() + supports := self.Options.OutputCodecTypes transopts := transcode.Options{} transopts.FindAudioDecoderEncoder = func(codec av.AudioCodecData, i int) (ok bool, err error, dec av.AudioDecoder, enc av.AudioEncoder) { @@ -188,10 +188,10 @@ func ConvertCmdline(args []string) (err error) { } defer muxer.Close() + options.OutputCodecTypes = muxer.SupportedCodecTypes() convdemux := &Demuxer{ Options: options, Demuxer: demuxer, - Muxer: muxer, } defer convdemux.Close()