better solution to add possibility to delete eSocketNotifiers,
[vuplus_dvbapp] / lib / dvb / decoder.cpp
index 71b3f39..c550163 100644 (file)
@@ -315,7 +315,7 @@ eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev)
                eWarning("%s: %m", filename);
        else
        {
-               m_sn = new eSocketNotifier(eApp, m_fd, eSocketNotifier::Priority);
+               m_sn = eSocketNotifier::create(eApp, m_fd, eSocketNotifier::Priority);
                CONNECT(m_sn->activated, eDVBVideo::video_event);
        }
        eDebug("Video Device: %s", filename);
@@ -527,8 +527,6 @@ int eDVBVideo::getPTS(pts_t &now)
 
 eDVBVideo::~eDVBVideo()
 {
-       if (m_sn)
-               delete m_sn;
        if (m_is_slow_motion)
                setSlowMotion(0);
        if (m_is_fast_forward)
@@ -1187,6 +1185,8 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
                                        ++pos;
                                if ((iframe[3] >> 4) != 0xE) // no pes header
                                        write(m_video_clip_fd, pes_header, sizeof(pes_header));
+                               else
+                                       iframe[4] = iframe[5] = 0x00;
                                write(m_video_clip_fd, iframe, s.st_size);
                                if (!seq_end_avail)
                                        write(m_video_clip_fd, seq_end, sizeof(seq_end));