[Pending] (Patch) AC3 Lang select when no MPEG audio. (1 Viewer)

jblomb

Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    Hi

    This patch adds the possibility to have the correct language AC3 stream if PreferAC3 is false and there are no MPEG-streams available.

    I have the setting "Prefer AC-3 sound" set to false for several reasons. When there are several MPEG streams available, the TVPlugin chooses the correct stream based on language preferences. This works as expected. However, Eurosport HD does not have any MPEG streams, but instead has four AC3 streams with different languages. Right now the TVPlugin fails to find the correct language, and since PreferAC3 is false, it just sets the default language to stream 0 - Finnish. Since I am swedish, it makes it hard to understand :)

    The patch gets the index of the correct AC3 stream, and keeps it. If PreferAC3 is false and the plugin can't set the correct MPEG language, it uses the index of the correct AC3 stream instead of stream 0. And Voila - Swedish is heard automagically. :)

    The patch is made against TVPlugin git 1.2.0.142.
     

    Attachments

    • TVHome.diff
      2.9 KB

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    I can confirm the issue. With Prefer AC3 enabled the correct (in this case stream 3, Swedish) stream is selected but with it disabled it indeed selects the wrong (Stream 0, Finnish, in this case) one.

    I have applied this patch. It does solve the problem when there's only AC3 streams available, but it introduces another issue.

    In config Prefer AC3 is disabled and as preferred languages only Swedish is set. With this patch, on a channel (tested on C+ Hits HD) with both MPEG2 (stream 0) and AC3 (stream 1) in English the AC3 one is chosen. Without the patch the MPEG2 stream is picked.

    //W
     

    jblomb

    Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    Thanks for testing and finding that issue :) I hadn't tested it enough. New patch on the way during the weekend.
     

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    New patch in first post which fixes the new issue.

    I'm sorry, but I still have this issue (both with the patch in the first post and with the pull request). I again tried with C+ Hits HD and as above stream 1, AC3, was picked rather than stream 0, MPEG2. Do you want some logs?

    //W
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    FYI: this part of the code has several unit tests (located in the unit tests project for the tv-client).
    please run the tests to make sure that nothing is broken.
    also the proper thing would be to add a few unit tests for this particular scenario.

    /gibman
     

    Users who are viewing this thread

    Top Bottom