History

avformat/teeproto: setup max_packet_size

It's the minimum of all child protocols max_packet_size. Can be used like this: ffmpeg -re -i cctv.mp4 -c copy -f mpegts \ -protocol_whitelist 'tee,file,udp' \ 'tee:out.ts|udp://127.0.0.1:6666?pkt_size=1316'

Zhao Zhili committed 3 years ago

Commit b8fca1f1 parent 1263b0a1 file · +12 −0Browse files

Unified · Split

libavformat/teeproto.c+12−0
@@ -131,6 +131,18 @@ loop_fail: · 130 unmodified lines
131 h->is_streamed |= c->child[i].url_context->is_streamed;131 h->is_streamed |= c->child[i].url_context->is_streamed;
132 }132 }
133 133
134 h->max_packet_size = 0;
135 for (i = 0; i < c->child_count; i++) {
136 int max = c->child[i].url_context->max_packet_size;
137 if (!max)
138 continue;
139
140 if (!h->max_packet_size)
141 h->max_packet_size = max;
142 else if (h->max_packet_size > max)
143 h->max_packet_size = max;
144 }
145
134 return 0;146 return 0;
135fail:147fail:
136 tee_close(h);148 tee_close(h);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t