diff mbox

[FFmpeg-devel] Patch for Reproducing Issue 7827

Message ID 9918cb96-3ce2-e1fa-77f1-7ac8a911170b@snafu.de
State Superseded
Headers show

Commit Message

Peter Belkner April 4, 2019, 6:32 a.m. UTC
This patch does not improve or fix something instead it is meant for 
easily reproducing issue 7827 (as requested, cf. 
https://trac.ffmpeg.org/ticket/7827). I've to admit that I don't know 
how to produce a patch by "git format-patch" instead it was made by "git 
diff > muxing.patch".

Comments

mypopy@gmail.com April 4, 2019, 6:49 a.m. UTC | #1
On Thu, Apr 4, 2019 at 2:33 PM Peter Belkner <pbelkner@snafu.de> wrote:
>
> This patch does not improve or fix something instead it is meant for
> easily reproducing issue 7827 (as requested, cf.
> https://trac.ffmpeg.org/ticket/7827). I've to admit that I don't know
> how to produce a patch by "git format-patch" instead it was made by "git
> diff > muxing.patch".
>
A lot of docs for this type question, this is a refer
https://www.x.org/wiki/Development/Documentation/SubmittingPatches/

You can used the command like:

git format-patch HEAD~1      # create a patch for the last commit

And I think "git diff > muxing.patch"  will drop the commit message,
it's a part of the patch for review, Tks.
diff mbox

Patch

diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 08da98e574..75766f497b 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -49,6 +49,8 @@ 
 
 #define SCALE_FLAGS SWS_BICUBIC
 
+#define MUX_MATROSKA_FLAC
+
 // a wrapper around a single output AVStream
 typedef struct OutputStream {
     AVStream *st;
@@ -600,7 +602,12 @@  int main(int argc, char **argv)
         encode_video = 1;
     }
     if (fmt->audio_codec != AV_CODEC_ID_NONE) {
-        add_stream(&audio_st, oc, &audio_codec, fmt->audio_codec);
+#if defined (MUX_MATROSKA_FLAC) // [
+          if (!strcmp("matroska",fmt->name))
+            add_stream(&audio_st, oc, &audio_codec, AV_CODEC_ID_FLAC);
+          else
+#endif // ]
+          add_stream(&audio_st, oc, &audio_codec, fmt->audio_codec);
         have_audio = 1;
         encode_audio = 1;
     }