[Bug 680796] [0.11] Crash because of misaligned frame data

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Aug 13 08:58:57 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=680796
  GStreamer | gst-ffmpeg | git

--- Comment #16 from Arnaud Vrac <rawoul at gmail.com> 2012-08-13 15:58:52 UTC ---
Sorry I was wrong, this commit does not help. I've investigated and found out
that the misaligned frame buffer is allocated by _default_mem_copy, which
apparently does not respect alignment of the source memory.

I am still trying to find out why the buffer is copied in the first place. The
pipeline is allocated by playbin but the relevant part is the following:

avdev_mpeg4 ! streamsynchronizer ! queue ! videoconvert

The buffer allocated from the videoconvert buffer pool is already locked when
libav tries to map the frame, and I don't understand how it is possible.

The stack trace to the _default_mem_copy call is the following:

#0  _default_mem_copy (mem=0x72580008, offset=0, size=4294967295)
    at gstallocator.c:458
#1  0x77690d98 in gst_memory_copy (mem=0x72580008, offset=0, size=-1)
    at gstmemory.c:331
#2  0x77690dfc in gst_memory_make_mapped (mem=0x72580008, info=0x82192d0, 
    flags=3) at gstmemory.c:210
#3  0x77672d36 in gst_buffer_map_range (buffer=0x7644fc00, idx=0, length=1, 
    info=0x82192d0, flags=3) at gstbuffer.c:1348
#4  0x77218214 in default_map (meta=0x825897c, plane=0, info=0x82192d0, 
    data=0x82192c0, stride=0x82192a0, flags=3) at gstvideometa.c:133
#5  0x772185fa in gst_video_meta_map (meta=0x825897c, plane=0, info=0x82192d0, 
    data=0x82192c0, stride=0x82192a0, flags=3) at gstvideometa.c:269
#6  0x772151cb in gst_video_frame_map_id (frame=0x8219250, info=0x81ce0f4, 
    buffer=0x7644fc00, id=-1, flags=3) at video-frame.c:80
#7  0x77215438 in gst_video_frame_map (frame=0x8219250, info=0x81ce0f4, 
    buffer=0x7644fc00, flags=3) at video-frame.c:165
#8  0x747e3cbb in gst_ffmpegviddec_get_buffer ()
   from /srv/nfs/fbx6hd_master/usr/lib/gstreamer-1.0/libgstlibav.so
#9  0x74aa6a1f in ff_thread_get_buffer (avctx=0x81ab800, f=0x81d3780)
    at libavcodec/pthread.c:916
#10 0x74a8cd06 in alloc_frame_buffer (pic=0x81d3780, s=0x81ce800)
    at libavcodec/mpegvideo.c:262
#11 ff_alloc_picture (s=0x81ce800, pic=0x81d3780, shared=0)
    at libavcodec/mpegvideo.c:314
#12 0x74a8f7b6 in MPV_frame_start (s=0x81ce800, avctx=0x81ab800)
    at libavcodec/mpegvideo.c:1221
#13 0x74901980 in ff_h263_decode_frame (avctx=0x81ab800, data=0x81aaf20, 
    data_size=0x75aa2eec, avpkt=0x75aa2e88) at libavcodec/h263dec.c:628
#14 0x74b08819 in avcodec_decode_video2 (avctx=0x81ab800, picture=0x81aaf20, 
    got_picture_ptr=0x75aa2eec, avpkt=0x75aa2e88) at libavcodec/utils.c:1152
#15 0x747e2cdf in gst_ffmpegviddec_video_frame ()
   from /srv/nfs/fbx6hd_master/usr/lib/gstreamer-1.0/libgstlibav.so
#16 0x747e358e in gst_ffmpegviddec_frame ()
   from /srv/nfs/fbx6hd_master/usr/lib/gstreamer-1.0/libgstlibav.so
#17 0x747e3a10 in gst_ffmpegviddec_handle_frame ()
   from /srv/nfs/fbx6hd_master/usr/lib/gstreamer-1.0/libgstlibav.so
#18 0x77219dda in gst_video_decoder_decode_frame (decoder=0x81ac040, 
    frame=0x7644fe80) at gstvideodecoder.c:2513
#19 0x7721d9f9 in gst_video_decoder_chain_forward (decoder=0x81ac040, 
    buf=0x7640a490, at_eos=0) at gstvideodecoder.c:1642
#20 0x7721e947 in gst_video_decoder_chain (pad=0x815d750, parent=0x81ac040, 
    buf=0x7640a490) at gstvideodecoder.c:1898
#21 0x7769492e in gst_pad_chain_data_unchecked (pad=0x815d750, type=4112, 
    data=0x7640a490) at gstpad.c:3587
#22 0x7769517f in gst_pad_push_data (pad=0x815d618, type=4112, data=0x7640a490)
    at gstpad.c:3800
#23 0x76dba034 in gst_single_queue_push_one (object=0x7640a490, sq=0x76415d28, 
    mq=0x8172020) at gstmultiqueue.c:1057
#24 gst_multi_queue_loop (pad=0x815d618) at gstmultiqueue.c:1303
#25 0x776b7c25 in gst_task_func (task=0x81288c0) at gsttask.c:316
#26 0x776b89e9 in default_func (tdata=0x815cb38, pool=0x8060410)
    at gsttaskpool.c:70
#27 0x77544a7b in g_thread_pool_thread_proxy ()
   from /srv/nfs/fbx6hd_master/lib/libglib-2.0.so.0
#28 0x775443a5 in g_thread_proxy ()
   from /srv/nfs/fbx6hd_master/lib/libglib-2.0.so.0
#29 0x774d0802 in start_thread () from
/srv/nfs/fbx6hd_master/lib/libpthread.so.0
#30 0x7742784e in clone () from /srv/nfs/fbx6hd_master/lib/libc.so.6

Do you have any idea why the frame buffer is being copied ? Thanks

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list