Reading a PCAP file in Gstreamer 1.14.4 crashes the application
I was using Debian 9 (Gstreamer 1.10.4) and several PCAP files were correctly erroring out while I try to pause/play the playbin. However, I recently switched to Debian 10 and I started seeing that the playbin pause and play would succeed for the same PCAP file in gstreamer 1.14.4 and would cause the program to crash.
For simplification, I worked on a standalone Cpp and have attached it to the email. Please change the path/name of the file. In my application I need to follow the below steps multiple times for the same file: creating the playbin --> setting it to pause --> setting it to play --> setting it to NULL I was able to mimic the behavior by using a for loop in the standalone code.
The file I used can be found here: https://drive.google.com/open?id=1frtrLwR5y8315K6FwuJ4kUZ8xa1U79y OR this link can be used to download it as well: https://data.kitware.com/api/v1/item/5b7ffd048d777f06857cb52d/download
Here are my results with using gst-launch-1.0:
Debian 9: Gstreamer errors out as expected:
% gst-launch-1.0 playbin uri=file:///tmp/sampleCar.pcap video-sink=appsink audio-sink=fakesink text-sink=fakesink
Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMad:mad0: No valid frames decoded before end of stream Additional debug info: gstaudiodecoder.c(2289): gst_audio_decoder_sink_eventfunc (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMad:mad0: no valid frames found ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline
Debian 10: Gstreamer asserts:
% gst-launch-1.0 playbin uri= file:///tmp/sampleCar.pcap video-sink=appsink audio-sink=fakesink text-sink=fakesink
Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "playbin0". Execution ended after 0:00:00.019542041 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Can you please confirm if it is a bug in Gstreamer 1.14.4?
Thanks, Nalini main.cpp