Fixes a segfault when trying to write nonexistent rtp information.
Signed-off-by: Simon Thelen <[email protected]>
---
ffmpeg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index f8b071a..6b41bb3 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);
}
--
2.6.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel