Remove unused parser

Since 1c02b58412, the parser is not used
anymore.
This commit is contained in:
Romain Vimont 2023-02-10 23:18:09 +01:00
parent 45b2e6db5c
commit f03f32267e
2 changed files with 1 additions and 14 deletions

View file

@ -228,20 +228,10 @@ run_demuxer(void *data) {
goto end;
}
demuxer->parser = av_parser_init(codec_id);
if (!demuxer->parser) {
LOGE("Could not initialize parser");
goto finally_close_sinks;
}
// We must only pass complete frames to av_parser_parse2()!
// It's more complicated, but this allows to reduce the latency by 1 frame!
demuxer->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
AVPacket *packet = av_packet_alloc();
if (!packet) {
LOG_OOM();
goto finally_close_parser;
goto finally_close_sinks;
}
for (;;) {
@ -267,8 +257,6 @@ run_demuxer(void *data) {
}
av_packet_free(&packet);
finally_close_parser:
av_parser_close(demuxer->parser);
finally_close_sinks:
sc_demuxer_close_sinks(demuxer);
end:

View file

@ -21,7 +21,6 @@ struct sc_demuxer {
struct sc_packet_sink *sinks[SC_DEMUXER_MAX_SINKS];
unsigned sink_count;
AVCodecParserContext *parser;
// successive packets may need to be concatenated, until a non-config
// packet is available
AVPacket *pending;