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'
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -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; |
| 135 | fail: | 147 | fail: |
| 136 | tee_close(h); | 148 | tee_close(h); |