mirror of https://git.ffmpeg.org/ffmpeg.git
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@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 70fb5eadc5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
132bd4bc4f
commit
b9a3e0af07
4
ffmpeg.c
4
ffmpeg.c
|
@ -2370,6 +2370,9 @@ static void print_sdp(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!j)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
av_sdp_create(avc, j, sdp, sizeof(sdp));
|
av_sdp_create(avc, j, sdp, sizeof(sdp));
|
||||||
|
|
||||||
if (!sdp_filename) {
|
if (!sdp_filename) {
|
||||||
|
@ -2385,6 +2388,7 @@ static void print_sdp(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
av_freep(&avc);
|
av_freep(&avc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue