GNOME Bugzilla – Bug 434824
rtp mp4 payloader doesn't handle newsegments and flush events correctly
Last modified: 2007-05-01 16:13:58 UTC
Hi, The rtpmp4vpayloader does some buffering of it's own to group several parts of the mpeg stream into one RTP packet. But unfortunately it has no code to handle new segments or flushes.. I've got an application concatinates streams saved in multiple file into one seamless rtp stream, which obviously causes a new segment as soon as a new file is started. Because of the buffering, it can happen that a new segment is sent downstream before the last buffer timestamped relative to that segment travels downstream. Which obviously causes issues.. So the cache needs to be flushed out before sending the new segment event further downstream. And on a flush stop event the cache should be obviously just be emptied.. I've solved this by overriding the event function of the basertppayloader as it doesn't have the functionality. So a proper event virtual function might be a nice addition to the base payloader. OTOH a quick grep showed that 6 of the 16 payloaders in -good use a similar buffering scheme, so it might be usefull to move that to the base payloader..
Created attachment 87309 [details] [review] Workaround for the mp4v payloader
Patch by: Sjoerd Simons <sjoerd at luon dot net> * gst/rtp/gstrtpmp4vpay.c: (gst_rtp_mp4v_pay_init), (gst_rtp_mp4v_pay_empty), (gst_rtp_mp4v_pay_event): * gst/rtp/gstrtpmp4vpay.h: Handle NEWSEGMENT and FLUSH events. Fixes #434824.