[SCM] libav/experimental: rename freq to period which is more correct, patch by Niobos, niobos dot be at gmail dot com

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:49:30 UTC 2013


The following commit has been merged in the experimental branch:
commit 1aae34890c71137768e59a858f65fb42509c613b
Author: Niobos <niobos at dest-unreach.be>
Date:   Tue Jul 28 17:51:12 2009 +0000

    rename freq to period which is more correct, patch by Niobos, niobos dot be at gmail dot com
    
    Originally committed as revision 19529 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index c29f9bb..7138009 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -44,7 +44,7 @@ typedef struct MpegTSService {
     char *provider_name;
     int pcr_pid;
     int pcr_packet_count;
-    int pcr_packet_freq;
+    int pcr_packet_period;
 } MpegTSService;
 
 typedef struct MpegTSWrite {
@@ -52,9 +52,9 @@ typedef struct MpegTSWrite {
     MpegTSSection sdt; /* MPEG2 sdt table context */
     MpegTSService **services;
     int sdt_packet_count;
-    int sdt_packet_freq;
+    int sdt_packet_period;
     int pat_packet_count;
-    int pat_packet_freq;
+    int pat_packet_period;
     int nb_services;
     int onid;
     int tsid;
@@ -442,11 +442,11 @@ static int mpegts_write_header(AVFormatContext *s)
 
     if (total_bit_rate <= 8 * 1024)
         total_bit_rate = 8 * 1024;
-    service->pcr_packet_freq = (total_bit_rate * PCR_RETRANS_TIME) /
+    service->pcr_packet_period = (total_bit_rate * PCR_RETRANS_TIME) /
         (TS_PACKET_SIZE * 8 * 1000);
-    ts->sdt_packet_freq = (total_bit_rate * SDT_RETRANS_TIME) /
+    ts->sdt_packet_period = (total_bit_rate * SDT_RETRANS_TIME) /
         (TS_PACKET_SIZE * 8 * 1000);
-    ts->pat_packet_freq = (total_bit_rate * PAT_RETRANS_TIME) /
+    ts->pat_packet_period = (total_bit_rate * PAT_RETRANS_TIME) /
         (TS_PACKET_SIZE * 8 * 1000);
 
     ts->mux_rate = 1; // avoid div by 0
@@ -470,7 +470,7 @@ static int mpegts_write_header(AVFormatContext *s)
         PCR_RETRANS_TIME * 8 * 8            / 1000;      /* PCR size */
 
     av_log(s, AV_LOG_DEBUG, "muxrate %d freq sdt %d pat %d\n",
-           total_bit_rate, ts->sdt_packet_freq, ts->pat_packet_freq);
+           total_bit_rate, ts->sdt_packet_period, ts->pat_packet_period);
 
     if (s->mux_rate)
         ts->mux_rate = s->mux_rate;
@@ -498,11 +498,11 @@ static void retransmit_si_info(AVFormatContext *s)
     MpegTSWrite *ts = s->priv_data;
     int i;
 
-    if (++ts->sdt_packet_count == ts->sdt_packet_freq) {
+    if (++ts->sdt_packet_count == ts->sdt_packet_period) {
         ts->sdt_packet_count = 0;
         mpegts_write_sdt(s);
     }
-    if (++ts->pat_packet_count == ts->pat_packet_freq) {
+    if (++ts->pat_packet_count == ts->pat_packet_period) {
         ts->pat_packet_count = 0;
         mpegts_write_pat(s);
         for(i = 0; i < ts->nb_services; i++) {
@@ -546,7 +546,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
         if (ts_st->pid == ts_st->service->pcr_pid) {
             ts_st->service->pcr_packet_count++;
             if (ts_st->service->pcr_packet_count >=
-                ts_st->service->pcr_packet_freq) {
+                ts_st->service->pcr_packet_period) {
                 ts_st->service->pcr_packet_count = 0;
                 write_pcr = 1;
             }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list