Extract packet merging

Config packets must be prepended to the next media packet. Extract the
logic to a new sc_packet_merger helper to simplify the demuxer code.
This commit is contained in:
Romain Vimont
2023-02-10 22:52:40 +01:00
parent f03f32267e
commit 49eb326ce9
5 changed files with 104 additions and 49 deletions

View File

@@ -21,10 +21,6 @@ struct sc_demuxer {
struct sc_packet_sink *sinks[SC_DEMUXER_MAX_SINKS];
unsigned sink_count;
// successive packets may need to be concatenated, until a non-config
// packet is available
AVPacket *pending;
const struct sc_demuxer_callbacks *cbs;
void *cbs_userdata;
};