diff options
author | Martin Storsjö <martin@martin.st> | 2010-05-21 07:08:29 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-05-21 07:08:29 +0000 |
commit | 648e41b342595ab11770ac99aa405971568d86d2 (patch) | |
tree | 193d9dc058e51aa55a7f8c2e2bb291246592dc1a /libavformat/rtspenc.c | |
parent | 9a761250699dc179c8e31caa55b1a785a5601e5e (diff) | |
download | ffmpeg-648e41b342595ab11770ac99aa405971568d86d2.tar.gz |
Take ff_write_chained in use in the mov rtp hinter and in the rtsp muxer
Originally committed as revision 23208 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtspenc.c')
-rw-r--r-- | libavformat/rtspenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c index f7aadd6e41..293baa2a38 100644 --- a/libavformat/rtspenc.c +++ b/libavformat/rtspenc.c @@ -27,6 +27,7 @@ #endif #include "network.h" #include "rtsp.h" +#include "internal.h" #include <libavutil/intreadwrite.h> static int rtsp_write_record(AVFormatContext *s) @@ -104,7 +105,6 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt) int n, tcp_fd; struct timeval tv; AVFormatContext *rtpctx; - AVPacket local_pkt; int ret; tcp_fd = url_get_file_handle(rt->rtsp_hd); @@ -140,12 +140,8 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt) rtsp_st = rt->rtsp_streams[pkt->stream_index]; rtpctx = rtsp_st->transport_priv; - /* Use a local packet for writing to the chained muxer, otherwise - * the internal stream_index = 0 becomes visible to the muxer user. */ - local_pkt = *pkt; - local_pkt.stream_index = 0; - ret = av_write_frame(rtpctx, &local_pkt); - /* av_write_frame does all the RTP packetization. If using TCP as + ret = ff_write_chained(rtpctx, 0, pkt, s); + /* ff_write_chained does all the RTP packetization. If using TCP as * transport, rtpctx->pb is only a dyn_packet_buf that queues up the * packets, so we need to send them out on the TCP connection separately. */ |