[FFmpeg-cvslog] ffmpeg: Don' t try and write sdp info if none of the outputs had an rtp format.

Simon Thelen git at videolan.org
Wed Nov 11 02:46:53 CET 2015


ffmpeg | branch: release/2.8 | Simon Thelen <ffmpeg-dev at c-14.de> | Mon Nov  2 16:36:16 2015 +0100| [dac3598563ad14704efc40f52acb1eb3b294835d] | committer: Michael Niedermayer

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 at c-14.de>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 70fb5eadc580a82c4b977a1233d70ad0041faba0)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dac3598563ad14704efc40f52acb1eb3b294835d
---

 ffmpeg.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2b3085a..ce54374 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);
 }
 



More information about the ffmpeg-cvslog mailing list