MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / handle_packets

Function handle_packets

libavformat/mpegts.c:1268–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1266}
1267
1268static int handle_packets(MpegTSContext *ts, int nb_packets)
1269{
1270 AVFormatContext *s = ts->stream;
1271 uint8_t packet[TS_PACKET_SIZE];
1272 int packet_num, ret;
1273
1274 ts->stop_parse = 0;
1275 packet_num = 0;
1276 for(;;) {
1277 if (ts->stop_parse>0)
1278 break;
1279 packet_num++;
1280 if (nb_packets != 0 && packet_num >= nb_packets)
1281 break;
1282 ret = read_packet(s, packet, ts->raw_packet_size);
1283 if (ret != 0)
1284 return ret;
1285 ret = handle_packet(ts, packet);
1286 if (ret != 0)
1287 return ret;
1288 }
1289 return 0;
1290}
1291
1292static int mpegts_probe(AVProbeData *p)
1293{

Callers 2

mpegts_read_headerFunction · 0.85
mpegts_read_packetFunction · 0.85

Calls 2

handle_packetFunction · 0.85
read_packetFunction · 0.70

Tested by

no test coverage detected