GNOME Bugzilla – Bug 753152
pcapparse wrong magic when used with identity sync=1
Last modified: 2015-08-31 18:43:03 UTC
When using pcapparse on the following pcap file with "identity sync=1" it fails with bad magic error but the file is a valid pcap file and works without the identity element. https://drive.google.com/file/d/0B12AhxvnYHrAQUpvWmozMm9mZG8 gst-launch-1.0 -v rtpbin name=rtpbin \ filesrc location=audio-video.pcap ! pcapparse src-port=1 ! identity sync=1 ! "application/x-rtp, payload=111, clock-rate=48000" ! rtpbin.recv_rtp_sink_0 \ rtpbin. ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! audiorate ! voaacenc ! aacparse ! mp4mux ! filesink location=test.mp4 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0.GstProxyPad:proxypad0: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_src: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000\,\ ssrc\=\(uint\)1177017523" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000\,\ ssrc\=\(uint\)1177017523" /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpPtDemux:rtpptdemux0.GstPad:sink: caps = "application/x-rtp\,\ payload\=\(int\)111\,\ clock-rate\=\(int\)48000\,\ ssrc\=\(uint\)1177017523" ERROR: from element /GstPipeline:pipeline0/GstPcapParse:pcapparse0: The stream is of a different type than handled by this element. Additional debug info: gstpcapparse.c(557): gst_pcap_parse_chain (): /GstPipeline:pipeline0/GstPcapParse:pcapparse0: File is not a libpcap file, magic is 9DE41B1C Execution ended after 0:00:00.010994312 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Created attachment 310223 [details] [review] pcapparse: Reset state on flush and state changes
Attached is a patch that fixes the error reporting problem you are seeing, but your real problem was that the caps were not complete enough. gst-launch-1.0 -v rtpbin name=rtpbin filesrc location=audio-video.pcap ! pcapparse src-port=1 ! identity sync=1 ! "application/x-rtp, payload=111, clock-rate=48000, media=audio, encoding-name=OPUS" ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! audiorate ! voaacenc ! aacparse ! mp4mux ! filesink location=test.mp4
Merged pcapparse: Reset state on flush and state changes (1.79 KB, patch) 2015-08-28 20:34 EDT, Olivier Crête accepted-commit_now Details | Diff | Review