[FFmpeg-cvslog] rtp: Don't read priv_data unless it is allocated
Martin Storsjö
git at videolan.org
Fri Dec 21 14:11:32 CET 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Dec 20 13:53:27 2012 +0200| [a925f723a915bc0255e2673f8817af5212131763] | committer: Martin Storsjö
rtp: Don't read priv_data unless it is allocated
This makes all users of rtpenc_chain (rtsp muxer, sapenc, mov
rtp hinting) work again, broken since 8034130e0.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a925f723a915bc0255e2673f8817af5212131763
---
libavformat/rtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 6512206..38b2348 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -97,7 +97,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt,
AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL;
/* Was the payload type already specified for the RTP muxer? */
- if (ofmt && ofmt->priv_class) {
+ if (ofmt && ofmt->priv_class && fmt->priv_data) {
int64_t payload_type;
if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 &&
payload_type >= 0)
More information about the ffmpeg-cvslog
mailing list