decoders do not support discontinuity well
Submitted by Jon Mandrell
I am attempting to play a stream coming from a satellite TV provider. This stream sometimes has dropped packets but I still expect it to be roughly playable (I know there will be audio and video glitches from time to time).
However, when I attempt to play this using gstreamer 1.10.2 decoders appear to stop across the discontinuity.
A simple example is the following test pipeline I've been using (this only plays the audio part of the stream just to keep things simple, but it happens with video as well):
gst-launch-1.0 -v udpsrc uri=udp://22.214.171.124:52416 do-timestamp=true ! application/x-rtp,media=video,clock-rate=90000 ! rtpsession ! rtpssrcdemux ! rtpjitterbuffer latency=1000 do-lost=true ! rtpptdemux ! rtpmp2tdepay ! tsdemux ! audio/mpeg ! queue ! avdec_aac ! audioconvert ! alsasink sync=true
I have placed a copy of a .pcap file that exhibits this problem on dropbox at:
Using GST_DEBUG=*:2 the message that is logged at the discontinuity point is:
0:00:39.530837723 1306 0x1363f20 ERROR libav :0:: Input buffer exhausted before END element found
0:00:39.530960400 1306 0x1363f20 WARN libav gstavauddec.c:632:gst_ffmpegauddec_frame:
<avdec_aac0> avdec_aac: decoding error (len: -1094995529, have_data: 0)
If I decode the video portion of the stream using this pipeline:
gst-launch-1.0 -v udpsrc uri=udp://126.96.36.199:52416 do-timestamp=true ! application/x-rtp,media=video,clock-rate=90000 ! rtpsession ! rtpssrcdemux ! rtpjitterbuffer latency=1000 do-lost=true ! rtpptdemux ! rtpmp2tdepay ! tsdemux ! video/x-h264 ! h264parse ! avdec_h264 ! fakesink
it also fails. The GST_DEBUG output is:
0:00:39.275041817 1385 0x213a950 ERROR libav :0:: error while decoding MB 32 20, bytestream -24
Immediately at this point the decoder stops outputting frames.