irtspparse: got drained data when handle_frame() does nothing
Current implementation fails on some pcap files with:
ERROR:../subprojects/gst-plugins-bad/gst/pcapparse/gstirtspparse.c:195:gst_irtsp_parse_handle_frame: assertion failed: (map.size >= IRTSPParse->current_offset)
Log shows that handle_frame() gets drained data when it does nothing(no skip, no flush). Several days ago I also created issue on baseparse here because I thought it's a baseparse bug. What's interesting is that implementation based on using skipsize works for this case. So I think there are 3 possibilities:
- Current approach of doing nothing until we get payload is wrong.
- Bug in GstBaseParse.
- Error somewhere before irtspparse(pcap file or pcapparse).
While I was preparing test pcap file, I encountered some magic. When I removed RTSP part it stopped failing in assertion. So maybe the problem is in pcapparse.
Here's my full cmd line, pcap file is attached:
/opt/gstreamer/gst-uninstalled.py gst-launch-1.0 -v filesrc location=cam_full_2_rtp.pcap ! tee name=t ! pcapparse src-ip=176.109.192.74 src-port=554 ! irtspparse channel_id=0 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=99 ! rtpjitterbuffer ! rtph264depay ! video/x-h264, framerate=25/1 ! h264parse ! queue ! mux. t. ! pcapparse src-ip=176.109.192.74 src-port=554 ! irtspparse channel_id=2 ! application/x-rtp, media=audio, clock-rate=8000, encoding-name=PCMU, payload=0 ! rtpjitterbuffer ! rtppcmudepay ! queue! mux. avimux name=mux ! filesink location=865c352f9f0db354e0facfca28ed7259.avi
```[cam_full_2_rtp.pcap](/uploads/7fd8bf36d452ea7ca4c13ff9e8ee2f83/cam_full_2_rtp.pcap)