After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753152 - pcapparse wrong magic when used with identity sync=1
pcapparse wrong magic when used with identity sync=1
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 1.5.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-02 17:10 UTC by Ben
Modified: 2015-08-31 18:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pcapparse: Reset state on flush and state changes (1.79 KB, patch)
2015-08-29 00:34 UTC, Olivier Crête
committed Details | Review

Description Ben 2015-08-02 17:10:50 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 ...
Comment 1 Olivier Crête 2015-08-29 00:34:23 UTC
Created attachment 310223 [details] [review]
pcapparse: Reset state on flush and state changes
Comment 2 Olivier Crête 2015-08-29 00:36:54 UTC
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
Comment 3 Olivier Crête 2015-08-31 18:42:52 UTC
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