diff --git a/src/Format/Copy.php b/src/Format/Copy.php new file mode 100644 index 0000000..cd504c0 --- /dev/null +++ b/src/Format/Copy.php @@ -0,0 +1,18 @@ +codec instanceof VideoInterface) { - return $this->parseVideo(); + $this->parseVideo(); } if ($this->codec instanceof AudioInterface) { - return $this->parseAudio(); + $this->parseAudio(); } if ($this->codec instanceof Format\SubtitleInterface) { - return $this->parseSubtitle(); + $this->parseSubtitle(); + } + + if ($this->codec instanceof Format\Copy) { + $this->addFlag('c', 'copy'); } - $this->addFlag('c', 'copy'); $this->parseExtras($this->codec->getExtraParameters()); return $this; @@ -82,7 +85,6 @@ class Stream if (null !== ($codec = $this->codec->getSubtitleCodec())) { $this->addFlag('c', $codec); } - $this->parseExtras($this->codec->getExtraParameters()); return $this; } @@ -100,7 +102,6 @@ class Stream if (null !== ($channels = $this->codec->getAudioChannels())) { $this->addFlag('ac', $channels); } - $this->parseExtras($this->codec->getExtraParameters()); return $this; } @@ -115,9 +116,7 @@ class Stream $this->addFlag('b', "{$kb}k"); } - // If the user passed some additional format parameters. $this->parseExtras($this->codec->getAdditionalParameters()); - $this->parseExtras($this->codec->getExtraParameters()); return $this; }