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 663751 - gst-ffmpeg: assertions in aspect ratio calculation
gst-ffmpeg: assertions in aspect ratio calculation
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-10 08:54 UTC by Nicola
Modified: 2013-01-01 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file that show the issue (956.00 KB, application/octet-stream)
2011-12-06 11:32 UTC, Nicola
Details

Description Nicola 2011-11-10 08:54:21 UTC
here is the offending pipeline:

gst-launch -m -t rtspsrc location=rtsp://192.168.2.17/udpstream ! queue ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink sync=false

or 

gst-launch -m -t playbin2 uri=rtsp://192.168.2.17/udpstream


Program received signal SIGSEGV, Segmentation fault.

Thread 140737226680064 (LWP 5336)

  • #0 ff_mpeg_update_thread_context
    at /usr/include/x86_64-linux-gnu/bits/string3.h line 52
  • #1 submit_packet
    at libavcodec/pthread.c line 453
  • #2 ff_thread_decode_frame
    at libavcodec/pthread.c line 512
  • #3 avcodec_decode_video2
    at libavcodec/utils.c line 727
  • #4 gst_ffmpegdec_video_frame
    at gstffmpegdec.c line 1751
  • #5 gst_ffmpegdec_frame
    at gstffmpegdec.c line 2268
  • #6 gst_ffmpegdec_drain
    at gstffmpegdec.c line 2362
  • #7 gst_ffmpegdec_chain
    at gstffmpegdec.c line 2551
  • #8 gst_pad_push
    at gstpad.c line 4727
  • #9 gst_pad_push
  • #10 gst_base_rtp_depayload_push_ts
    at gstbasertpdepayload.c line 610
  • #11 gst_base_rtp_depayload_chain
    at gstbasertpdepayload.c line 354
  • #12 gst_pad_push
    at gstpad.c line 4727
  • #13 gst_queue_push_one
    at gstqueue.c line 1155
  • #14 gst_queue_loop
    at gstqueue.c line 1263
  • #15 gst_task_func
    at gsttask.c line 318
  • #16 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #17 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #18 start_thread
    at pthread_create.c line 304
  • #19 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #20 ??

the same url is fine with vlc and worked in previuos gstreamer version
Comment 1 Nicola 2011-12-06 11:32:13 UTC
Created attachment 202907 [details]
file that show the issue

gst-launch filesrc location=test.gdp ! gdpdepay ! ffdec_mpeg4 ! xvimagesink works fine with gstreamer in ubuntu 11.10 and segfault with current git
Comment 2 Nicola 2011-12-06 22:38:12 UTC
now that 665631 is fixed a workaround is to use mpeg4videoparse, this pipeline:

gst-launch filesrc location=test.gdp ! gdpdepay ! mpeg4videoparse ! ffdec_mpeg4 ! xvimagesink

now works
Comment 3 Vincent Penquerc'h 2012-01-17 11:38:26 UTC
Just trying now with git, both command lines (with and without mpeg4videoparse) run with no crash, displaying a similar (but obviously broken) video (moving mostly green/grey/black/yellow blocks/columns).
Can you check if this crash still happens for you ?

Valgrind shows use of uninitialized data in aspect ratio calculations, but I doubt this would cause a crash, so likely not the original issue.
Comment 4 Nicola 2012-01-17 11:50:34 UTC
Hi Vincent,

I just rechecked and I can see the video with no problem with gstreamer shipped with ubuntu (no green/grey/black/yellow blocks/columns I can see a room after an initial green frame), gst-uninstalled crash for me (without mpeg4videoparse), I have a 64 bit system,

how can I send you more infos?
Comment 5 Vincent Penquerc'h 2012-01-17 13:07:26 UTC
After a full rebuild of gst-ffmpeg+libav, I see a room *sigh*.
Still no crash though, with or without mpeg4videoparse.
I noticed ffmpeg tries to use headers from installed before headers from in-tree, so I have to remember to rm its installed headers before rebuilding. That likely explains the corrupt image I was seeing before.
Last libav commit is 0b8b3387a977dcdb6fb9e53bcc9966d34b2e4cec from 10 january.
We'll see if anyone else can repro this.
Comment 6 Nicola 2012-01-17 13:52:10 UTC
After a full rebuild of gst-ffmpeg+libav the segfault is not more here, remain a warning using this pipeline:

gst-launch --gst-fatal-warnings filesrc location=/tmp/test.gdp ! gdpdepay ! ffdec_mpeg4 ! xvimagesink


GStreamer-CRITICAL **: gst_util_fraction_multiply: assertion `a_d != 0' failed

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 140737241323264 (LWP 31315)

  • #0 g_logv
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #1 g_log
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #2 gst_util_fraction_multiply
    at gstutils.c line 4215
  • #3 gst_xvimage_sink_different_size_suggestion
    at xvimagesink.c line 2502
  • #4 gst_xvimagesink_buffer_alloc
    at xvimagesink.c line 2577
  • #5 gst_base_sink_pad_buffer_alloc
    at gstbasesink.c line 671
  • #6 gst_pad_buffer_alloc_unchecked
    at gstpad.c line 3022
  • #7 gst_pad_alloc_buffer_full
    at gstpad.c line 3099
  • #8 alloc_output_buffer
    at gstffmpegdec.c line 958
  • #9 gst_ffmpegdec_get_buffer
    at gstffmpegdec.c line 1071
  • #10 submit_packet
    at libavcodec/pthread.c line 554
  • #11 ff_thread_decode_frame
  • #12 avcodec_decode_video2
    at libavcodec/utils.c line 902
  • #13 gst_ffmpegdec_video_frame
    at gstffmpegdec.c line 1762
  • #14 gst_ffmpegdec_frame
    at gstffmpegdec.c line 2279
  • #15 gst_ffmpegdec_chain
    at gstffmpegdec.c line 2726
  • #16 gst_pad_push
    at gstpad.c line 4710
  • #17 gst_gdp_depay_chain
    at gstgdpdepay.c line 328
  • #18 gst_pad_push
    at gstpad.c line 4710
  • #19 gst_base_src_loop
    at gstbasesrc.c line 2559
  • #20 gst_task_func
    at gsttask.c line 327
  • #21 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #22 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #23 start_thread
    at pthread_create.c line 304
  • #24 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #25 ??

Comment 7 Vincent Penquerc'h 2012-01-17 15:12:31 UTC
Right, I do get those asserts as well.
Comment 8 Vincent Penquerc'h 2012-01-17 15:13:47 UTC
Not a blocker anymore, the asserts are not fatal.
Comment 9 Tim-Philipp Müller 2013-01-01 15:42:51 UTC
This works fine for me now:

gst-launch-1.0 filesrc location= /home/tpm/samples/misc/663751-mpeg4-decoder-warning.gdp ! gdpdepay ! avdec_mpeg4 ! xvimagesink -v

without any such warning (probably a side-effect of the video decoder having been ported to the new video decoder base class), so let's close this.

Please re-open or file a new bug if you still have issues with 1.x, thanks!