Segfault while using playbin2 ! How does the playbin2 convert the video display resolution automatically ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Segfault while using playbin2 ! How does the playbin2 convert the video display resolution automatically ?

harishjennykn
When I try to play a video with resolution of 720*400 using playbin2 , I get a crash saying
Caught SIGSEGV accessing address 0x18
Spinning.  Please run 'gdb gst-launch 2250' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

However, when I try to play the same video with the flags set to '(0x00000040): native-video     - Only use native video formats' ,
I am able to play the video!

I see in the crash logs that video is being tried to get scaled to 768*432 .  Why does the video resolution gets scaled automatically?
I see that in playbin2 a bin is created with queue, colorspace and videoscale elements. How the output resolution is decided ? Is it based on the screen resolution ? I am using a LCD with 800X480 resolution!
I also have both ffmpegcolorspace and videoscale element installed.

I have tried out the following set of pipelines!

works fine
*) gst-launch filesrc location= a.mp4 ! decodebin ! autovideosink -v

crash
*) gst-launch playbin2 uri=file:///home/root/a.mp4 -v

works fine
*) gst-launch playbin2 uri=file:///home/root/a.mp4 flags=0x00000040 -v


I tried the following seeing the code in gstplaysink.c
But it says cannot link videoscale to videosink
*) gst-launch filesrc location= a.mp4 ! decodebin ! ffmpegcolorspace ! videoscale ! autovideosink -v


I want to know why the crash occurs ?

Note: Currently using 0.10.36 and cannot switch to gstreamer-1.0 !


Thanks for any inputs in advance !
~HJ
Reply | Threaded
Open this post in threaded view
|

Re: Segfault while using playbin2 ! How does the playbin2 convert the video display resolution automatically ?

Baby Octopus
Is the resolution getting changed to make it a multiple of 16? Just a wild guess:)

~BO
Reply | Threaded
Open this post in threaded view
|

Re: Segfault while using playbin2 ! How does the playbin2 convert the video display resolution automatically ?

harishjennykn
It turned out to be my decoder was changing the output resolution.

And the crash was due to videoscale not supporting NV12 format in 10.36, which my decoder was outputting.

When I add the flag in playbin2 to play only native video formats, it omits configuration of ffmpegcolorspace and videoscale. Hence the video gets played !

~HJ