+
+ // Note: This will be wrong in the case of plugged packets, but that only happens
+ // for network streams, not for files, and write callbacks are only really relevant
+ // for files. (We don't want to do this from write_packet_or_die, as it only has
+ // the rescaled pts, which is unsuitable for callback.)
+ if (pkt.stream_index == 0 && write_callback != nullptr) {
+ write_callback(pts);
+ }