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 681436 - Crash in gstvideofilter.c:propose_allocation()
Crash in gstvideofilter.c:propose_allocation()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.11.x
Other AIX
: Normal major
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-08 09:24 UTC by sreerenj
Modified: 2012-08-08 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the crash in videofilter:propose_allocation() (1.91 KB, patch)
2012-08-08 09:24 UTC, sreerenj
committed Details | Review
remove fourcc typecast in sample pipeline (854 bytes, patch)
2012-08-08 10:07 UTC, sreerenj
committed Details | Review
Fix the crash in videofilter:propose_allocation() (1.35 KB, patch)
2012-08-08 11:55 UTC, sreerenj
rejected Details | Review

Description sreerenj 2012-08-08 09:24:04 UTC
Created attachment 220648 [details] [review]
Fix the crash in videofilter:propose_allocation()

To reproduce the issue: 

gst-launch-1.0 filesrc location=/home/samples/vc1/FlightSimX_720p60_51_15Mbps.wmv ! asfdemux ! queue ! avdec_wmv3 !  videoconvert ! "video/x-raw, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)2500000/41709, format=(string)BGRA" ! videoconvert ! xvimagesink

sample file: 
http://samples.mplayerhq.hu/V-codecs/WVC1/FlightSimX_720p60_51_15Mbps.wmv


playbin will work because there is no format conversion and basetransform is working in passthrough mode... To reproduce the issue we have to avoid the passthrough method in BaseTransform.

-- videofilter create bufferpool if there is none in the query.
-- Add "GST_VIDEO_META_API_TYPE" only if the videofilter creates video_buffer_pool.
Comment 1 Sebastian Dröge (slomo) 2012-08-08 10:04:54 UTC
commit 87075463458dac90103da1c324e88f8da722d017
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Wed Aug 8 12:06:45 2012 +0300

    videofilter: Fix the crash in propose_allocation
    
    Always set a buffer pool if none is provided and don't
    set/unref a NULL buffer pool on the query.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681436
Comment 2 sreerenj 2012-08-08 10:07:42 UTC
Created attachment 220656 [details] [review]
remove fourcc typecast in sample pipeline
Comment 3 Tim-Philipp Müller 2012-08-08 10:23:31 UTC
commit 8b916da6d783d002281c8f8cf9dff6e254e5170c
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Aug 8 12:19:31 2012 +0200

    videofilter: Really add a buffer pool if none was provided
    
    And also use the allocation parameters from the query if any
    and if there are none set our own (16-byte alignment) on the
    query.
Comment 4 sreerenj 2012-08-08 11:54:19 UTC
It should reopen i think since the commit 8b916da6d783d002281c8f8cf9dff6e254e5170c is creating a regression again..

Dont know whether this patch is the correct one, anyway attaching it(which is fixing the issue at least for one case..)..
Comment 5 sreerenj 2012-08-08 11:55:03 UTC
Created attachment 220664 [details] [review]
Fix the crash in videofilter:propose_allocation()
Comment 6 Sebastian Dröge (slomo) 2012-08-08 12:53:00 UTC
Review of attachment 220664 [details] [review]:

::: gst-libs/gst/video/gstvideofilter.c
@@ +98,3 @@
+    if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) {
+      gst_buffer_pool_config_add_option (structure,
+          GST_BUFFER_POOL_OPTION_VIDEO_META);

It shouldn't add the video meta at all. That's something upstream elements must do, especially as any upstream element is free to not support the video meta
Comment 7 Sebastian Dröge (slomo) 2012-08-08 12:53:50 UTC
Review of attachment 220664 [details] [review]:

::: gst-libs/gst/video/gstvideofilter.c
@@ -104,3 @@
     gst_query_add_allocation_pool (query, pool, size, 0, 0);
     gst_object_unref (pool);
-    gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);

It should however add the meta to the query as a possibility.
Comment 8 sreerenj 2012-08-08 13:19:49 UTC
backtrace:

 0xb6d65f93 in put_pixels16_sse2 (block=0xb344c058 '\020' <repeats 200 times>..., 
    pixels=0xb35a6058 '\020' <repeats 200 times>..., line_size=1280, h=16) at libavcodec/x86/dsputil_mmx.c:455
  • #1 vc1_mc_1mv
    at libavcodec/vc1dec.c line 657
  • #2 vc1_decode_p_mb
    at libavcodec/vc1dec.c line 3644
  • #3 vc1_decode_p_blocks
    at libavcodec/vc1dec.c line 4774
  • #4 vc1_decode_blocks
    at libavcodec/vc1dec.c line 4908
  • #5 vc1_decode_frame
    at libavcodec/vc1dec.c line 5735
  • #6 avcodec_decode_video2
    at libavcodec/utils.c line 1152
  • #7 gst_ffmpegviddec_video_frame
    at gstffmpegviddec.c line 1083
  • #8 gst_ffmpegviddec_frame
    at gstffmpegviddec.c line 1210
  • #9 gst_ffmpegviddec_handle_frame
    at gstffmpegviddec.c line 1326
  • #10 gst_video_decoder_decode_frame
    at gstvideodecoder.c line 2483
  • #11 gst_video_decoder_chain_forward
    at gstvideodecoder.c line 1618
  • #12 gst_video_decoder_chain
    at gstvideodecoder.c line 1874
  • #13 gst_pad_chain_data_unchecked
    at gstpad.c line 3587
  • #14 gst_pad_push_data
    at gstpad.c line 3800
  • #15 gst_queue_push_one
    at gstqueue.c line 1045
  • #16 gst_queue_loop
    at gstqueue.c line 1161
  • #17 gst_task_func
    at gsttask.c line 316
  • #18 default_func
    at gsttaskpool.c line 70
  • #19 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #20 g_thread_proxy
    at gthread.c line 801
  • #21 start_thread
    at pthread_create.c line 308
  • #22 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 9 Sebastian Dröge (slomo) 2012-08-08 13:22:20 UTC
That's bug #680796 and unrelated to this one here
Comment 10 sreerenj 2012-08-08 13:24:31 UTC
okay,,,,thanks slomo..