summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Thelen <[email protected]>2015-11-02 16:36:16 +0100
committerMichael Niedermayer <[email protected]>2015-11-12 02:55:47 +0100
commitb9a3e0af07bc09e1c5db28bf90505e1d7a76daa6 (patch)
treef49b767bd7d0b1d6c9634aa2ec33581c8405fcdb
parent132bd4bc4fb4a3d6c4cf0504f0f42699d5c20e7c (diff)
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 70fb5eadc580a82c4b977a1233d70ad0041faba0) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 8bf0aa87c0..b65ee7144e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2370,6 +2370,9 @@ static void print_sdp(void)
}
}
+ if (!j)
+ goto fail;
+
av_sdp_create(avc, j, sdp, sizeof(sdp));
if (!sdp_filename) {
@@ -2385,6 +2388,7 @@ static void print_sdp(void)
}
}
+fail:
av_freep(&avc);
}