[FFmpeg-soc] [soc]: r2019 - dvbmuxer/mpegtsenc.c

bcoudurier subversion at mplayerhq.hu
Wed Mar 12 16:55:43 CET 2008


Author: bcoudurier
Date: Wed Mar 12 16:55:42 2008
New Revision: 2019

Log:
resync with trunk

Modified:
   dvbmuxer/mpegtsenc.c

Modified: dvbmuxer/mpegtsenc.c
==============================================================================
--- dvbmuxer/mpegtsenc.c	(original)
+++ dvbmuxer/mpegtsenc.c	Wed Mar 12 16:55:42 2008
@@ -62,9 +62,8 @@ static void mpegts_write_section(MpegTSS
             b |= 0x40;
         *q++ = b;
         *q++ = s->pid;
-        s->cc = (s->cc) & 0xf;
+        s->cc = (s->cc + 1) & 0xf;
         *q++ = 0x10 | s->cc;
-        s->cc++;
         if (first)
             *q++ = 0; /* 0 offset */
         len1 = TS_PACKET_SIZE - (q - packet);
@@ -531,11 +530,11 @@ static void mpegts_write_pes(AVFormatCon
     int val, is_start, len, header_len, write_pcr;
     int afc_len, stuffing_len;
     int64_t pcr = -1; /* avoid warning */
-    int offset = 0;
 
     is_start = 1;
     while (payload_size > 0) {
         retransmit_si_info(s);
+
         write_pcr = 0;
         if (ts_st->pid == ts_st->service->pcr_pid) {
             pcr = ts->cur_pcr + TS_PACKET_SIZE*90000LL / ts->mux_rate;
@@ -596,8 +595,8 @@ static void mpegts_write_pes(AVFormatCon
                 }
             }
         }
-        memcpy(buf + TS_PACKET_SIZE - len, payload + offset, len);
-        offset += len;
+        memcpy(buf + TS_PACKET_SIZE - len, payload, len);
+        payload += len;
         payload_size -= len;
         put_buffer(s->pb, buf, TS_PACKET_SIZE);
         ts->cur_pcr += TS_PACKET_SIZE*8*90000LL / ts->mux_rate;



More information about the FFmpeg-soc mailing list