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 589609 - [PATCH] fix dvdspu crash when subtitles do not fit the incoming video
[PATCH] fix dvdspu crash when subtitles do not fit the incoming video
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal critical
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 594105 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-24 13:41 UTC by ogg.k.ogg.k
Modified: 2009-09-07 06:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Try to fit subtitles within an incoming video where subs would not fit (and avoid crashing too) (10.70 KB, patch)
2009-07-24 13:43 UTC, ogg.k.ogg.k
committed Details | Review

Description ogg.k.ogg.k 2009-07-24 13:41:27 UTC
Please describe the problem:
If overlaying SPU images onto an incoming video, where the video is smaller
than the original one, and the SPUs do not fit, dvdspu may crash.


Steps to reproduce:
1. Apply the Kate patch to Thoggen (so, meant for Tim-Phillip Muller only for now I suppose :))
2. Encode a DVD at a low resolution, selecting at least one SPU stream
3. Play back that video, using katedec and dvdspu


Actual results:
dvdspu may crash when trying to display SPUs outside the video.

Expected results:
A lack of crash. Moving and/or scaling SPUs would be nice too.


Does this happen every time?
For some test cases, yes.


Other information:
Patch attached.
Comment 1 ogg.k.ogg.k 2009-07-24 13:43:31 UTC
Created attachment 139154 [details] [review]
Try to fit subtitles within an incoming video where subs would not fit (and avoid crashing too)
Comment 2 Robert Ancell 2009-09-04 06:58:07 UTC
There is a file in the Ubuntu bug that reproduces this problem:
https://bugs.edge.launchpad.net/ubuntu/+source/gst-plugins-bad0.10/+bug/408647

I've tested this patch and it stops the crash but also seems to hide the subtitles.
Comment 3 Sebastian Dröge (slomo) 2009-09-04 07:04:34 UTC
*** Bug 594105 has been marked as a duplicate of this bug. ***
Comment 4 Sebastian Dröge (slomo) 2009-09-04 07:12:05 UTC
commit c6c19b79e0b120d3312edf7eadb5bf9e76654f9e
Author: Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com>
Date:   Thu Jul 16 10:06:36 2009 +0100

    [dvdspu] Try to fit subtitles within the video frame when they're too large
    
    Fixes bug #589609.
Comment 5 ogg.k.ogg.k 2009-09-04 11:09:38 UTC
> I've tested this patch and it stops the crash but also seems to hide the
> subtitles.

I've tested that file, and the subtitles are very large images, including large amounts of blank space, so when clipped you just see part of the image, which happens to be within the transparent border.
A fix could be to look inside the subtitles, trim transparent borders, and center the rest, but it really should be fixed encoding side, and this goes into diminishing returns.
Comment 6 Alex L. Mauer 2009-09-07 06:47:38 UTC
It's not that the subtitles are very large images (they're from standard DVD resolution of 720×480), but that the video is very small (320×240) and totem/gstreamer don't scale the subtitles to fit.  The video plays fine, including subtitles, in VLC and mplayer, which do scale the subtitles appropriately.