Fixes a segfault when trying to write nonexistent rtp information. Signed-off-by: Simon Thelen <ffmpeg-...@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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel