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 350299 - [playbin] "Internal data flow error" opening movie with subtitle file
[playbin] "Internal data flow error" opening movie with subtitle file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal major
: 0.10.13
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
: 416087 445893 471910 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-07 15:47 UTC by Young-Ho Cha
Modified: 2007-08-30 19:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
gstreamer debug message (866.55 KB, application/x-gzip)
2006-08-07 15:49 UTC, Young-Ho Cha
  Details
subtitle (44.28 KB, application/x-srt)
2006-09-23 13:49 UTC, Michaël Arnauts
  Details
Possible fix (2.67 KB, patch)
2007-05-23 17:35 UTC, Jan Schmidt
committed Details | Review

Description Young-Ho Cha 2006-08-07 15:47:47 UTC
Please describe the problem:
When open a movie file with subtitle, error dialog raise.

After upgrade with gstreamer 0.10.9, it seems this bug produced.

Steps to reproduce:
1. locate a movie file.
2. locate a subtitle file.
3. open with totem.


Actual results:
raise popup dialog which shows "Internal data flow error" message.

Expected results:
play a movie

Does this happen every time?
often, but not always.

Other information:
When play with gst-launch like follow command, it never happenned.

$ gst-launch-0.10 playbin uri="file:///blah.avi" suburi="file:///blah.smi"

I'll add gst log file.
Comment 1 Young-Ho Cha 2006-08-07 15:49:31 UTC
Created attachment 70401 [details]
gstreamer debug message
Comment 2 Michaël Arnauts 2006-09-23 13:49:07 UTC
I get this also in the latest totem (2.16.1)

Totem could not play 'file:///home/michael/Desktop/Pirates Of The Caribbean-Curse Of The Black Pearl cd1.avi'.

Internal data flow error.

However, --debug doesn't seem to add much to the output (no difference when it does work)

michael@maycolaptop:~/Desktop$ totem --debug "Pirates Of The Caribbean-Curse Of The Black Pearl cd1.avi" 
** Message: w 420 h 436 sidebar 0
No accelerated IMDCT transform found
** Message: Couldn't initialize lirc.


It seems to be related to the subtitle it loads, since it doesn't happen on some files, and does (sometimes) happen on others. I will attach the subtitle that sometimes give this problem.
Comment 3 Michaël Arnauts 2006-09-23 13:49:54 UTC
Created attachment 73275 [details]
subtitle
Comment 4 Vytas 2006-11-06 20:04:49 UTC
I can also confirm it, and only with movie with subtitles, so yes, the problem most probably is how totem renders subtitles on the movie.
Comment 5 Tim-Philipp Müller 2006-11-11 01:44:40 UTC
I've managed to reproduce this as well now. The problem seems to be this:

 gst_pad_link_prepare: trying to link subtitle-bin:text_src and textbin:text_sink
 gst_pad_link_check_hierarchy: pads have different grandparents (NULL) and <playbin>

There seems to be something racy going on somewhere in playbin, since it only fails occasionally for me (but it happens to always fail so far when I do a debug log).
Comment 6 Ivan Frade 2006-11-11 22:03:44 UTC
It fails only trying to play a movie with subtitles. I can open without any problems files without subtitles.

(The same bug in: 
https://launchpad.net/distros/ubuntu/+source/totem/+bug/70223 )


Using gst-launch i get the following error:

Estableciendo el flujo a PAUSADO ...
El flujo se está PRECACHEANDO ...
ERROR: desde el elemento /playbin0/subtitle-bin/filesrc0: Error del flujo interno de datos.
Información adicional de depurado:
gstbasesrc.c(1569): gst_base_src_loop (): /playbin0/subtitle-bin/filesrc0:
streaming task paused, reason not-linked (-1)
ERROR: El flujo no quiere precachearse.
Setting pipeline to NULL ...
FREEING pipeline ...
Comment 7 tama 2006-12-05 11:52:53 UTC
(In reply to comment #5)
> There seems to be something racy going on somewhere in playbin, since it only
> fails occasionally for me (but it happens to always fail so far when I do a
> debug log).

You're probably right about the race thing, since with the same error message, I get two different behaviors depending on the mood of gstreamer and totem. The error message is always:
"Totem could not play 'file:///home/[name].avi'. Internal data flow error."

First possible behavior: Once I press OK, I can switch off the subs in view->subtitles and press play so it will play. At this point totem outputs:

** (totem:6206): WARNING **: Error: Internal data flow error. (gstbasesrc.c(1569): gst_base_src_loop (): /play/subtitle-bin/filesrc4:
streaming task paused, reason not-linked (-1))

But it plays fine.
If now I want the subs back, I just activate them through view->subtitles again and they work.
Funny thing here is that if I didn't switch the subs off after the first error and pressed play, this other error happens: "An error occurred. Internal data flow error". After this the behavior is the same described above.

Second behavior: Once I press OK, subtitles submenu in view is deactivated, so I can't switch them off and hence, every time I try to play, the same first error raises again.

It seems that some files are more prone to produce either of these behaviors, but, on my experience, *every* movie that I want to play with subtitles produce this Internal data flow error. The difference is sometimes I can play the trick on the first behavior and watch the movie and sometimes I just can't watch it with subtitles.
Anyway, there's not a deterministic pattern on which behavior a movie will observe but, as I said, some files are more prone to either of those.

I'm using Totem 2.16.2 with GStreamer 0.10.10

If there's some way I can help to resolve this bug, please let me know. It is frustrating to have to fight totem every time I want to play a subtitled movie.
Comment 8 Laerte Andrade 2007-01-24 19:20:31 UTC
As Ali Sabil pointed out in the Launchpad.net bug report (https://launchpad.net/totem/+bug/70223), it is possible to actually play the movie *with* subtitles if you do a fast triple-click on the "Play" button before the error dialog box appears. Does this help finding the source of the bug?
Comment 9 Brian Kerrick Nickel 2007-02-11 21:27:02 UTC
I get this bug too and triple clicking on "Play" does make it play successfully.
Comment 10 Young-Ho Cha 2007-02-20 00:19:28 UTC
I'm using decodebin2 element that added gst-plugins-base 0.10.11, via set USE_DECODEBIN2 shell variable.

and never happened that raise popup dialog.

but sometimes, play status went invalid. 

Play control button and statusbar showed media was played, but media was not played.

and press Right arrow key (for skip 1 minute forward), just played properly.
Comment 11 Kamil Páral 2007-03-02 21:24:17 UTC
I have the same problem in Gnome 2.17.92 with libgstreamer 0.10.11cvs20070222. When I play movie with subtitles, in 90% i get "Internal data flow error". Sometimes (with the same movie) it plays fine. On some movies it is enough to press play button after getting error. When run from console, i get this output:

0:00:01.415291000 11122 0x80940a0 ERROR                totem bacon-video-widget-gst-0.10.c:371:bvw_error_msg_print_dbg: error message = Internal data flow error.
0:00:01.415380000 11122 0x80940a0 ERROR                totem bacon-video-widget-gst-0.10.c:373:bvw_error_msg_print_dbg: error domain  = 2626 (gst-stream-error-quark)
0:00:01.415396000 11122 0x80940a0 ERROR                totem bacon-video-widget-gst-0.10.c:374:bvw_error_msg_print_dbg: error code    = 1
0:00:01.415410000 11122 0x80940a0 ERROR                totem bacon-video-widget-gst-0.10.c:375:bvw_error_msg_print_dbg: error debug   = gstbasesrc.c(1640): gst_base_src_loop (): /play/subtitle-bin/filesrc0:
streaming task paused, reason not-linked (-1)
0:00:01.415427000 11122 0x80940a0 ERROR                totem bacon-video-widget-gst-0.10.c:376:bvw_error_msg_print_dbg: error source  = <filesrc0>
** Message: Error: Internal data flow error.
gstbasesrc.c(1640): gst_base_src_loop (): /play/subtitle-bin/filesrc0:
streaming task paused, reason not-linked (-1)
Comment 12 Tim-Philipp Müller 2007-03-08 15:26:49 UTC
*** Bug 416087 has been marked as a duplicate of this bug. ***
Comment 13 Fryderyk Dziarmagowski 2007-03-30 14:02:50 UTC
Any news here? Will be great to hear, that there is some progress on this exteremly annoying bug.
Comment 14 Fryderyk Dziarmagowski 2007-04-04 18:40:50 UTC
with USE_DECODEBIN2 I can confirm observations from #10.
It is possible to play subtitled movie, but I have to press left
(or right) cursor key to force playback
(gst-p-base 0.11.12 / totem 2.18.1)
Comment 15 Jan Schmidt 2007-05-23 17:35:42 UTC
Created attachment 88687 [details] [review]
Possible fix

Here's a patch that fixes the race for me.
Comment 16 Sven Arvidsson 2007-05-23 18:33:20 UTC
Works fine for me too, thanks!
Comment 17 Jan Schmidt 2007-05-24 10:20:58 UTC
Fixed in CVS:

2007-05-24  Jan Schmidt  <thaytan@mad.scientist.com>

        * gst/playback/gstplaybin.c: (add_sink), (dummy_blocked_cb),
        (setup_sinks):
        Block the subtitle bin output queue before ghosting it and linking,
        then unblock after. This avoids spurious not-linked errors caused 
        by the queue starting up (because it gets linked when it is ghosted). 
        Fixes: #350299
Comment 18 Tim-Philipp Müller 2007-06-10 11:02:08 UTC
*** Bug 445893 has been marked as a duplicate of this bug. ***
Comment 19 sashabe 2007-08-04 12:06:15 UTC
(In reply to comment #15)
> Created an attachment (id=88687) [edit]
> Possible fix
> 
> Here's a patch that fixes the race for me.
> 

Could you please explain how to install this patch?
Comment 20 Tim-Philipp Müller 2007-08-04 19:15:40 UTC
> Could you please explain how to install this patch?

Just upgrade gstreamer core and -base to a current version.  I'm sure there are updated packages for your distro somewhere, or a version of your distro that comes with an up-to-date version of GStreamer (if not, ask in the support channels/forums for your distro how to create packages with the patch applied).  Installing the patch by itself is non-trivial.
Comment 21 Tim-Philipp Müller 2007-08-30 19:19:54 UTC
*** Bug 471910 has been marked as a duplicate of this bug. ***