aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Thelen <ffmpeg-dev@c-14.de>2015-11-02 16:36:16 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-09 23:56:29 +0100
commitdac3598563ad14704efc40f52acb1eb3b294835d (patch)
tree3cf1312911238d6c09d87c9a25103643129c1e7f
parentc0cd8747ef14dabb91261d910c34bc09c683773a (diff)
downloadffmpeg-dac3598563ad14704efc40f52acb1eb3b294835d.tar.gz
ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Fixes a segfault when trying to write nonexistent rtp information. Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 70fb5eadc580a82c4b977a1233d70ad0041faba0) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2b3085afea..ce5437404f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2447,6 +2447,9 @@ static void print_sdp(void)
}
}
+ if (!j)
+ goto fail;
+
av_sdp_create(avc, j, sdp, sizeof(sdp));
if (!sdp_filename) {
@@ -2462,6 +2465,7 @@ static void print_sdp(void)
}
}
+fail:
av_freep(&avc);
}