Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-08-20 12:12:08 +0400
committerLuca Abeni <lucabe72@email.it>2007-08-20 12:12:08 +0400
commit6d1ba1ac836898b35b212f7687563cf0eef82c16 (patch)
tree85b943cd070ab0b3ab9f284316d5341685d510b1 /ffmpeg.c
parentf35917b2f3bc65171ab015cd54b1a056d6dfaf6e (diff)
Print an SDP when all outputs are RTP (the SDP can be saved in a text file
and used to receive the streams) Originally committed as revision 10150 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index b947e25340..a7e1fc842e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1339,6 +1339,13 @@ static int output_packet(AVInputStream *ist, int ist_index,
return -1;
}
+static void print_sdp(AVFormatContext **avc, int n)
+{
+ char sdp[2048];
+
+ avf_sdp_create(avc, n, sdp, sizeof(sdp));
+ printf("SDP:\n%s\n", sdp);
+}
/*
* The following code is the main loop of the file converter
@@ -1356,6 +1363,7 @@ static int av_encode(AVFormatContext **output_files,
AVInputStream *ist, **ist_table = NULL;
AVInputFile *file_table;
int key;
+ int want_sdp = 1;
file_table= (AVInputFile*) av_mallocz(nb_input_files * sizeof(AVInputFile));
if (!file_table)
@@ -1823,6 +1831,12 @@ static int av_encode(AVFormatContext **output_files,
ret = AVERROR(EINVAL);
goto fail;
}
+ if (strcmp(output_files[i]->oformat->name, "rtp")) {
+ want_sdp = 0;
+ }
+ }
+ if (want_sdp) {
+ print_sdp(output_files, nb_output_files);
}
if ( !using_stdin && verbose >= 0) {