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 172854 - totem spawns error and stops when opening with a badly formed subtitle
totem spawns error and stops when opening with a badly formed subtitle
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-06 19:42 UTC by Michaël Arnauts
Modified: 2005-04-14 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible fix (6.35 KB, patch)
2005-04-12 11:24 UTC, Ronald Bultje
none Details | Review
oops (10.20 KB, patch)
2005-04-12 11:27 UTC, Ronald Bultje
none Details | Review
better version (10.25 KB, patch)
2005-04-14 12:26 UTC, Ronald Bultje
none Details | Review

Description Michaël Arnauts 2005-04-06 19:42:36 UTC
I don't know if this should be filed against gstreamer of totem, but if it
doesn't belong here, just move it...

I have a srt file with spaces before each number (badly formed) like this:

 1
time --> time2
text of the sub

 2
time --> time2
text of the sub

When i open the avi-file, gstreamer tries to load it, and spawns an error...

It should simply continiue, without displaying an dialogbox, but just skipping
the sub.

ERROR (0x83af008 - 309115:38:35.291969000)        subparse( 2067)
gstsubparse.c(653):gst_subparse_format_autodetect:<subparse0> The input is not a
valid/supported subtitle file
ERROR (0x83af008 - 309115:38:35.292416000)       scheduler( 2067)
gstoptimalscheduler.c(2797):gst_opt_scheduler_iterate:<GstOptScheduler@0x83ae7f0>
in error state

(totem:2067): GStreamer-WARNING **: element subbin claimed state-change
success,but state didn't change to PLAYING. State is PAUSED (NONE_PENDING
pending), fix the element
ERROR (0x8c6a3a8 - 309115:38:40.889448000)        subparse( 2067)
gstsubparse.c(653):gst_subparse_format_autodetect:<subparse1> The input is not a
valid/supported subtitle file
ERROR (0x8c6a3a8 - 309115:38:40.889655000)       scheduler( 2067)
gstoptimalscheduler.c(2797):gst_opt_scheduler_iterate:<GstOptScheduler@0x839e250>
in error state
Comment 1 Ronald Bultje 2005-04-07 12:24:31 UTC
Re-assinging to GStreamer.

We currently use a very simple 'filesrc ! subparse ! queue' pipeline for
subtitles, which is obviously not good enough. Subtitles should be subject to
type detection, too. Then, we could ignore unsupported subtitles.

Working on it...
Comment 2 Ronald Bultje 2005-04-12 11:24:08 UTC
Created attachment 45166 [details] [review]
possible fix

With this patch, subtitle loading is generalized a bit. We use a decodebin,
allow only subtitles (so no more video :) ) in subtitles, and just plug. On
error, subtitles are removed again and they are ignored. Else, they will be
used.

Tested cases:
gst-launch uri=file:///mediafile
gst-launch uri=file:///mediafile suburi=file:///workingsub
gst-launch uri=file:///mediafile suburi=file:///randomfile

The second gives subs, the other two don't, so I think the patch works fine.
Can you please test it before I commit? Apply to gst-plugins/gst/playback/.
Comment 3 Ronald Bultje 2005-04-12 11:27:34 UTC
Created attachment 45168 [details] [review]
oops

Obviously, this requires autoplugging for subparse, which I forgot to add.
Comment 4 Michaël Arnauts 2005-04-12 14:35:45 UTC
It works, however, i get the memory-problems as described in
http://bugzilla.gnome.org/show_bug.cgi?id=300200 . Don't know if it's related...

The file is a .avi this time, not a .mov
Comment 5 Ronald Bultje 2005-04-14 12:26:54 UTC
Created attachment 45247 [details] [review]
better version

Could you retry with CVS? The memory issues should be over now. New patch
should fix that it would sometimes invalidly claim to not support the codec.
Comment 6 Ronald Bultje 2005-04-14 14:32:02 UTC
applied, should be fixed now. Open a new bug about the memory issues if you can
reproduce.
Comment 7 Michaël Arnauts 2005-04-14 14:44:51 UTC
hmm, there is still an issue.
When the subtitle is correct, it works, but when it's incorrect, i get the same
error as before: 
Totem could not play '<movie>'.
The input is not a valid/supported subtitle file

when i press ok, totem goes into "stopped" mode. If i press the play button
afterwards, it goes into "playing" mode, but nothing happens.

I guess the best way to handle this is to show the error, but continiue playing,
so the user doesn't have to press play again.
Comment 8 Ronald Bultje 2005-04-14 14:48:17 UTC
Crap, then autoplugging apparently works. Can you confirm that by running
--gst-debug=playbasebin:5?
Comment 9 Michaël Arnauts 2005-04-14 14:54:57 UTC
output:

michael@mayco:/mnt/extra/Sources/gst-plugins$ totem --gst-debug=playbasebin:5
Option '--gst-debug=playbasebin:5' is unknown and was ignored
DEBUG (0x8084088 - 309302:49:52.323922000)     playbasebin( 8339)
gstplaybasebin.c(1503):gst_play_base_bin_set_property: setting new uri to
file:///mnt/extra/Films%20(DivX)/There's%20Something%20About%20Mary.avi
DEBUG (0x8084088 - 309302:49:52.324198000)     playbasebin( 8339)
gstplaybasebin.c(1518):gst_play_base_bin_set_property: setting new .sub uri to
file:///mnt/extra/Films%20(DivX)/There's%20Something%20About%20Mary.srt
DEBUG (0x8084088 - 309302:49:52.340059000)     playbasebin( 8339)
gstplaybasebin.c(932):new_decoded_pad: play base: new decoded pad 0
DEBUG (0x8084088 - 309302:49:52.340517000)     playbasebin( 8339)
gstplaybasebin.c(966):new_decoded_pad: play base: pad needs new preroll
DEBUG (0x8084088 - 309302:49:52.341541000)     playbasebin( 8339)
gstplaybasebin.c(693):add_stream: add stream to group 0x83a4418
DEBUG (0x839bda8 - 309302:49:52.395257000)     playbasebin( 8339)
gstplaybasebin.c(932):new_decoded_pad: play base: new decoded pad 0
DEBUG (0x839bda8 - 309302:49:52.395407000)     playbasebin( 8339)
gstplaybasebin.c(966):new_decoded_pad: play base: pad needs new preroll
DEBUG (0x839bda8 - 309302:49:52.396133000)     playbasebin( 8339)
gstplaybasebin.c(693):add_stream: add stream to group 0x83a4418
DEBUG (0x839bda8 - 309302:49:52.396377000)     playbasebin( 8339)
gstplaybasebin.c(1909):gst_play_base_bin_found_tag: forwarding taglist 0x8452050
from avidemux0 to play
DEBUG (0x839bda8 - 309302:49:52.402261000)     playbasebin( 8339)
gstplaybasebin.c(1915):gst_play_base_bin_found_tag: forwarded taglist 0x8452050
from avidemux0 to play
DEBUG (0x839bda8 - 309302:49:52.412626000)     playbasebin( 8339)
gstplaybasebin.c(932):new_decoded_pad: play base: new decoded pad 0
DEBUG (0x839bda8 - 309302:49:52.412865000)     playbasebin( 8339)
gstplaybasebin.c(966):new_decoded_pad: play base: pad needs new preroll
DEBUG (0x839bda8 - 309302:49:52.413551000)     playbasebin( 8339)
gstplaybasebin.c(693):add_stream: add stream to group 0x83a4418
DEBUG (0x839bda8 - 309302:49:52.414111000)     playbasebin( 8339)
gstplaybasebin.c(1909):gst_play_base_bin_found_tag: forwarding taglist 0x847a348
from avidemux0 to play
DEBUG (0x839bda8 - 309302:49:52.420973000)     playbasebin( 8339)
gstplaybasebin.c(1915):gst_play_base_bin_found_tag: forwarded taglist 0x847a348
from avidemux0 to play
DEBUG (0x839bda8 - 309302:49:52.421696000)     playbasebin( 8339)
gstplaybasebin.c(1909):gst_play_base_bin_found_tag: forwarding taglist 0x8479e90
from avidemux0 to play
DEBUG (0x839bda8 - 309302:49:52.421797000)     playbasebin( 8339)
gstplaybasebin.c(1915):gst_play_base_bin_found_tag: forwarded taglist 0x8479e90
from avidemux0 to play
DEBUG (0x8084088 - 309302:49:52.452930000)     playbasebin( 8339)
gstplaybasebin.c(1334):setup_source: waiting for first group...
DEBUG (0x839bda8 - 309302:49:54.202845000)     playbasebin( 8339)
gstplaybasebin.c(753):no_more_pads: no more pads
DEBUG (0x839bda8 - 309302:49:54.203020000)     playbasebin( 8339)
gstplaybasebin.c(406):group_commit: group 0x83a4418 done
LOG   (0x839bda8 - 309302:49:54.203145000)     playbasebin( 8339)
gstplaybasebin.c(425):group_commit: removing preroll signal preroll_audio_src1
LOG   (0x839bda8 - 309302:49:54.203239000)     playbasebin( 8339)
gstplaybasebin.c(425):group_commit: removing preroll signal preroll_video_src0
LOG   (0x839bda8 - 309302:49:54.203329000)     playbasebin( 8339)
gstplaybasebin.c(425):group_commit: removing preroll signal preroll_text_src
DEBUG (0x839bda8 - 309302:49:54.203413000)     playbasebin( 8339)
gstplaybasebin.c(431):group_commit: signal group done
DEBUG (0x839bda8 - 309302:49:54.203501000)     playbasebin( 8339)
gstplaybasebin.c(433):group_commit: signaled group done
DEBUG (0x8084088 - 309302:49:54.203583000)     playbasebin( 8339)
gstplaybasebin.c(1338):setup_source: group done !
LOG   (0x8084088 - 309302:49:54.203719000)     playbasebin( 8339)
gstplaybasebin.c(1451):set_active_source: Changing active source of type 1 to 0
LOG   (0x8084088 - 309302:49:54.203927000)     playbasebin( 8339)
gstplaybasebin.c(1451):set_active_source: Changing active source of type 2 to 0
LOG   (0x8084088 - 309302:49:54.214885000)     playbasebin( 8339)
gstplaybasebin.c(1451):set_active_source: Changing active source of type 3 to 0
DEBUG (0x8084088 - 309302:49:54.220559000)     playbasebin( 8339)
gstplaybasebin.c(1741):gst_play_base_bin_change_state: emit signal
DEBUG (0x8084088 - 309302:49:54.441879000)     playbasebin( 8339)
gstplaybasebin.c(1744):gst_play_base_bin_change_state: done
ERROR (0x83a3800 - 309302:49:54.460797000)        subparse( 8339)
gstsubparse.c(653):gst_subparse_format_autodetect:<subparse0> The input is not a
valid/supported subtitle file
DEBUG (0x83a3800 - 309302:49:54.461079000)     playbasebin( 8339)
gstplaybasebin.c(1876):gst_play_base_bin_error: forwarding error "The input is
not a valid/supported subtitle file" from subparse0 to play
DEBUG (0x83a3800 - 309302:49:54.461212000)     playbasebin( 8339)
gstplaybasebin.c(1881):gst_play_base_bin_error: forwarded error "The input is
not a valid/supported subtitle file" from subparse0 to play
ERROR (0x83a3800 - 309302:49:54.461393000)       scheduler( 8339)
gstoptimalscheduler.c(2797):gst_opt_scheduler_iterate:<GstOptScheduler@0x83a3190>
in error state
DEBUG (0x839bda8 - 309302:49:55.048961000)     playbasebin( 8339)
gstplaybasebin.c(1909):gst_play_base_bin_found_tag: forwarding taglist 0x80bbfb0
from mad0 to play
DEBUG (0x839bda8 - 309302:49:55.049165000)     playbasebin( 8339)
gstplaybasebin.c(1915):gst_play_base_bin_found_tag: forwarded taglist 0x80bbfb0
from mad0 to play
DEBUG (0x839bda8 - 309302:49:55.062863000)     playbasebin( 8339)
gstplaybasebin.c(1909):gst_play_base_bin_found_tag: forwarding taglist 0x876b0b0
from mad0 to play
DEBUG (0x839bda8 - 309302:49:55.063013000)     playbasebin( 8339)
gstplaybasebin.c(1915):gst_play_base_bin_found_tag: forwarded taglist 0x876b0b0
from mad0 to play

... here it stops, pressing pause / play agian gives this extra:

DEBUG (0x83a3800 - 309302:51:47.664031000)     playbasebin( 8339)
gstplaybasebin.c(1876):gst_play_base_bin_error: forwarding error "Could not
initialize supporting library." from subparse0 to play
DEBUG (0x83a3800 - 309302:51:47.677029000)     playbasebin( 8339)
gstplaybasebin.c(1881):gst_play_base_bin_error: forwarded error "Could not
initialize supporting library." from subparse0 to play
ERROR (0x83a3800 - 309302:51:47.677247000)       scheduler( 8339)
gstoptimalscheduler.c(2797):gst_opt_scheduler_iterate:<GstOptScheduler@0x83a3190>
in error state
Comment 10 Michaël Arnauts 2005-04-14 16:25:30 UTC
okay, let's just say i was stupid and forgot something to add to configure...
sorry, ronald, it really is fixed :)