From a636b58ce17adad640ae392ffcf3f9dade2bff80 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 16 Feb 2010 19:26:49 +0000 Subject: [PATCH] Fix two problems (no idea how this ever worked): - the return value of url_open_dyn_*buf() is 0 on success, so using if (!(res = url_open_dyn_*buf())) return res; is not going to work - url_open_dyn_packet_buf actually writes the max_packet_size before each piece of data. Feeding this to the ASF demuxer will never work. Therefore, use url_open_dyn_buf() instead. Originally committed as revision 21853 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtp_asf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtp_asf.c b/libavformat/rtp_asf.c index d44ff5a67f..75662c95f0 100644 --- a/libavformat/rtp_asf.c +++ b/libavformat/rtp_asf.c @@ -196,7 +196,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, av_free(p); } if (!len_off && !asf->pktbuf && - !(res = url_open_dyn_packet_buf(&asf->pktbuf, rt->asf_ctx->packet_size))) + (res = url_open_dyn_buf(&asf->pktbuf)) < 0) return res; if (!asf->pktbuf) return AVERROR(EIO);