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 539254 - [dvdreadsrc] DVDs with multiple angles switch angles during read
[dvdreadsrc] DVDs with multiple angles switch angles during read
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other All
: Normal normal
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-20 10:04 UTC by ogg.k.ogg.k
Modified: 2010-11-13 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This fixes the problem on my test cases (763 bytes, patch)
2008-06-20 10:06 UTC, ogg.k.ogg.k
none Details | Review
fix code to compute next block to read from the correct angle (Update to latest git) (1.03 KB, patch)
2009-03-07 23:38 UTC, ogg.k.ogg.k
none Details | Review
Trivial patch to fix DVD angles (563 bytes, patch)
2010-11-06 16:51 UTC, Thomas Green
committed Details | Review

Description ogg.k.ogg.k 2008-06-20 10:04:01 UTC
Please describe the problem:
When reading a DVD with multiple angles, the angle will sometimes switch
to a different angle.


Steps to reproduce:
1. Get a DVD with more than one angle
2. use dvdreadsrc to read it (eg, use Thoggen)
3. If you're unlucky, watch how the angle switches to another one


Actual results:
You get a movie with interleaved angles - quite annoying when one angle is the
movie and the other is a storyboard version


Expected results:
The reading keeps to the selected angle

Does this happen every time?
100% repro on a couple test cases, but may or may not happen on other DVDs with multiple angles

Other information:
Comment 1 ogg.k.ogg.k 2008-06-20 10:06:49 UTC
Created attachment 113108 [details] [review]
This fixes the problem on my test cases

I left the original code for easy comparison, as I have no idea
if this is correct, though it works 100% for me. I do not know where
is the doc describing how the blocks and their types are arranged.
But it fixes my test cases and makes me happy, so that's good :)
Comment 2 ogg.k.ogg.k 2009-03-07 23:38:06 UTC
Created attachment 130255 [details] [review]
fix code to compute next block to read from the correct angle (Update to latest git)

I somehow managed to encode a new DVD with the stock version of the
dvdread plugin, so I had to reapply this patch. In case someone here
somehow might want to push it up the tree, here it is again, as git
against latest.
It just happens to work for me, I make no representations about the
conceptual correctness of it, but it scratches my itch.
Comment 3 Thomas Green 2009-08-13 20:28:05 UTC
I can reproduce this with my Nausicaa DVD. As reported, sometimes the wrong cell is returned and you end up watching the story-board instead, e.g. chapter 12 contains two cells (27 and 28) and it will always play cell 28 after finishing 27 instead of skipping over it and on to the next chapter (Cell 28 is the story-board).

It seems to me that the logic of the while loop should be reversed, i.e. it should keep incrementing the current cell _until_ it finds a BLOCK_MODE_LAST_CELL, and then add one to get the next cell. This certainly seems to be how it is implemented in play_title.c (distributed with libdvdread):

for( i = 0;; ++i ) {
  if( cur_pgc->cell_playback[ cur_cell + i ].block_mode
        == BLOCK_MODE_LAST_CELL ) {
    next_cell = cur_cell + i + 1;
    break;
  }
}

Very different, compared to how dvdreadsrc implements it:

while (pgc->cell_playback[cell].block_mode == BLOCK_MODE_LAST_CELL)
  ++cell;
return cell + 1;


Simply changing the condition in the while loop from == to != seems to fix this for me. It seems to happily play through with either angle 1 or 2 now with no switching back and forth.
Comment 4 Thomas Green 2010-11-06 16:51:19 UTC
Created attachment 173956 [details] [review]
Trivial patch to fix DVD angles

This issue can be reproduced so easily (any DVD with multiple angles) and the fix is so small; hopefully the attached patch will help to get this confirmed and/or committed.
Comment 5 Tim-Philipp Müller 2010-11-13 12:41:17 UTC
Thanks for the patch!

 commit c29b56fae9c52f90569e24da42b9c4b95405b059
 Author: Thomas Green <thomasgr33n@gmail.com>
 Date:   Sat Nov 13 12:34:37 2010 +0000

    dvdreadsrc: fix handling of multi-angle streams
    
    We would output all angles interleaved instead of just
    the selected angle.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=539254


Sorry it took so long to get this fixed.