aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-12-20 13:53:27 +0200
committerMartin Storsjö <martin@martin.st>2012-12-20 14:25:49 +0200
commita925f723a915bc0255e2673f8817af5212131763 (patch)
treedf1e66aa744118c345025b2ad45484cbe15d19e8 /libavformat/rtp.c
parent1eaff98c8320d9ba48fbaec2a558f31f4104de98 (diff)
downloadffmpeg-a925f723a915bc0255e2673f8817af5212131763.tar.gz
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@martin.st>
Diffstat (limited to 'libavformat/rtp.c')
-rw-r--r--libavformat/rtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 651220692c..38b2348d45 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)