Ticket #2806: subtitle_track_choice.diff

File subtitle_track_choice.diff, 2.3 KB (added by skamithi, 15 years ago)

if the aspect is 16/9, use the "wide" subtitle track. otherwise also use the track with the stream id of 0x20(32)

  • libs/libmythtv/DVDRingBuffer.cpp

     
    326326                ClearMenuSPUParameters();
    327327                ClearSubtitlesOSD();
    328328
     329                if (IsInMenu())
     330                {
     331                    buttonstreamid = 32;
     332                    int aspect = dvdnav_get_video_aspect(dvdnav);
     333                    // determine which subtitle stream id to use
     334                    if (aspect != 0)                           
     335                        buttonstreamid = spu->physical_wide + buttonstreamid;
     336                }
     337
    329338                if (autoselectsubtitle)
    330339                    curSubtitleTrack = dvdnav_get_active_spu_stream(dvdnav);
    331340
     
    626635    if (buf_size < 4)
    627636        return;
    628637
    629     if ((buttonstreamid < stream_id) &&
    630         (buttonstreamid > 0))
     638    if (buttonstreamid != stream_id)
    631639        return;
    632640
    633641    QMutexLocker lock(&menuBtnLock);
    634642
    635     buttonstreamid = stream_id;
    636643    ClearMenuSPUParameters();
    637644    uint8_t *spu_pkt;
    638645    spu_pkt = (uint8_t*)av_malloc(buf_size);
     
    855874    dvdnav_highlight_area_t hl;
    856875    dvdnav_get_current_highlight(dvdnav, &button);
    857876    pci = dvdnav_get_current_nav_pci(dvdnav);
    858     dvdnav_get_highlight_area(pci,button, b_mode, &hl);
     877    dvdnav_get_highlight_area(pci, button, b_mode, &hl);
    859878
    860879    for (int i = 0 ; i < 4 ; i++)
    861880    {
     
    902921    menuBuflength = 0;
    903922    hl_startx = hl_starty = 0;
    904923    hl_width = hl_height = 0;
    905     buttonstreamid = 0;
    906924}
    907925
    908926int DVDRingBufferPriv::NumMenuButtons(void) const
  • libs/libmythdvdnav/vm.c

     
    757757    }
    758758  }
    759759
    760   if((vm->state).SPST_REG & 0x40)
    761     /* Bit 7 set means hide, and only let Forced display show */
     760  if((vm->state).domain == VTS_DOMAIN && !((vm->state).SPST_REG & 0x40))
     761  /* Bit 7 set means hide, and only let Forced display show */
     762    return -1;
     763  else
    762764    return (streamN & 0x1F);
    763   else
    764     return -1;
    765765}
    766766
    767767void vm_get_angle_info(vm_t *vm, int *current, int *num_avail) {