comparison mpegts.c @ 2158:22e6d0a65dfd libavformat

remove now unused "global" pcr_pid
author michael
date Fri, 08 Jun 2007 17:26:05 +0000
parents 0103a8479df5
children fdaf754594df
comparison
equal deleted inserted replaced
2157:0103a8479df5 2158:22e6d0a65dfd
92 /** compute exact PCR for each transport stream packet */ 92 /** compute exact PCR for each transport stream packet */
93 int mpeg2ts_compute_pcr; 93 int mpeg2ts_compute_pcr;
94 94
95 int64_t cur_pcr; /**< used to estimate the exact PCR */ 95 int64_t cur_pcr; /**< used to estimate the exact PCR */
96 int pcr_incr; /**< used to estimate the exact PCR */ 96 int pcr_incr; /**< used to estimate the exact PCR */
97 int pcr_pid; /**< used to estimate the exact PCR */
98 97
99 /* data needed to handle file based ts */ 98 /* data needed to handle file based ts */
100 /** stop parsing loop */ 99 /** stop parsing loop */
101 int stop_parse; 100 int stop_parse;
102 /** packet containing Audio/Video data */ 101 /** packet containing Audio/Video data */
444 return; 443 return;
445 444
446 pcr_pid = get16(&p, p_end) & 0x1fff; 445 pcr_pid = get16(&p, p_end) & 0x1fff;
447 if (pcr_pid < 0) 446 if (pcr_pid < 0)
448 return; 447 return;
449 ts->pcr_pid = pcr_pid;
450 #ifdef DEBUG_SI 448 #ifdef DEBUG_SI
451 av_log(ts->stream, AV_LOG_DEBUG, "pcr_pid=0x%x\n", pcr_pid); 449 av_log(ts->stream, AV_LOG_DEBUG, "pcr_pid=0x%x\n", pcr_pid);
452 #endif 450 #endif
453 program_info_length = get16(&p, p_end) & 0xfff; 451 program_info_length = get16(&p, p_end) & 0xfff;
454 if (program_info_length < 0) 452 if (program_info_length < 0)
1202 if (nb_pcrs >= 2) 1200 if (nb_pcrs >= 2)
1203 break; 1201 break;
1204 } 1202 }
1205 nb_packets++; 1203 nb_packets++;
1206 } 1204 }
1207 ts->pcr_pid = pcr_pid;
1208 1205
1209 /* NOTE1: the bitrate is computed without the FEC */ 1206 /* NOTE1: the bitrate is computed without the FEC */
1210 /* NOTE2: it is only the bitrate of the start of the stream */ 1207 /* NOTE2: it is only the bitrate of the start of the stream */
1211 ts->pcr_incr = (pcrs[1] - pcrs[0]) / (packet_count[1] - packet_count[0]); 1208 ts->pcr_incr = (pcrs[1] - pcrs[0]) / (packet_count[1] - packet_count[0]);
1212 ts->cur_pcr = pcrs[0] - ts->pcr_incr * packet_count[0]; 1209 ts->cur_pcr = pcrs[0] - ts->pcr_incr * packet_count[0];