Ticket #2821: eject_fix.diff

File eject_fix.diff, 1.2 KB (added by skamithi, 17 years ago)

forgot to close the file descriptor.. causes eject to fail..

  • DVDRingBuffer.h

     
    7575    bool OpenFile(const QString &filename);
    7676    void PlayTitleAndPart(int _title, int _part)
    7777        { dvdnav_part_play(dvdnav, _title, _part); }
    78     void close(void);
     78    void CloseDVD(void);
    7979    bool nextTrack(void);
    8080    void prevTrack(void);
    8181    int  safe_read(void *data, unsigned sz);
  • DVDRingBuffer.cpp

     
    66#include <sys/stat.h>
    77#include <sys/ioctl.h>
    88#include <fcntl.h>
     9#include <unistd.h>
    910#endif
    1011
    1112
     
    6364
    6465DVDRingBufferPriv::~DVDRingBufferPriv()
    6566{
    66     close();
     67    CloseDVD();
    6768    ClearMenuSPUParameters();
    6869}
    6970
    70 void DVDRingBufferPriv::close(void)
     71void DVDRingBufferPriv::CloseDVD(void)
    7172{
    7273    if (dvdnav)
    7374    {
     
    12411242
    12421243    if (ioctl(fd, SG_IO, &sghdr) < 0)
    12431244        VERBOSE(VB_PLAYBACK, LOC_ERR + "Limit DVD Speed Failed");
    1244    
     1245   
     1246    close(fd);
    12451247    VERBOSE(VB_PLAYBACK, LOC + "Limiting DVD Speed Successful");
    12461248#else
    12471249    (void)speed;