[FFmpeg-devel] [PATCH] RTSP muxer, round 5
Ronald S. Bultje
rsbultje
Mon Feb 22 20:54:16 CET 2010
Hi,
On Fri, Feb 19, 2010 at 6:05 PM, Martin Storsj? <martin at martin.st> wrote:
[9]:
+static int rtsp_write_close(AVFormatContext *s)
+{
+ RTSPState *rt = s->priv_data;
+ char cmd[1024];
+
+ snprintf(cmd, sizeof(cmd),
+ "PAUSE %s RTSP/1.0\r\n",
+ s->filename);
+ rtsp_send_cmd_async(s, cmd);
+
+ snprintf(cmd, sizeof(cmd),
+ "TEARDOWN %s RTSP/1.0\r\n",
+ s->filename);
+ rtsp_send_cmd_async(s, cmd);
+
+ rtsp_close_streams(s);
+ url_close(rt->rtsp_hd);
+ return 0;
+}
Why do you send both PAUSE and TEARDOWN?
in write_packet():
+ av_init_packet(&local_pkt);
+ local_pkt.stream_index = 0;
+ local_pkt.pts = pkt->pts;
+ local_pkt.flags = pkt->flags;
+ local_pkt.data = pkt->data;
+ local_pkt.size = pkt->size;
Is the packet copy necessary? I'm not totally sure, but could you just
change pkt->stream_index and forward?
At large, patch fine with me.
Ronald
More information about the ffmpeg-devel
mailing list