[FFmpeg-devel] [PATCH 1/2] ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Simon Thelen
ffmpeg-dev at c-14.de
Mon Nov 2 15:57:49 CET 2015
Fixes a segfault when trying to write nonexistent rtp information.
Signed-off-by: Simon Thelen <ffmpeg-dev at c-14.de>
---
ffmpeg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index f8b071a..a6b3c1c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2447,6 +2447,9 @@ static void print_sdp(void)
}
}
+ if (j == 0)
+ 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);
}
--
2.6.2
More information about the ffmpeg-devel
mailing list