tag/TagHandler: pass by reference
This commit is contained in:
@@ -392,7 +392,7 @@ static void
|
||||
FfmpegScanMetadata(const AVStream &stream,
|
||||
const TagHandler &handler, void *handler_ctx)
|
||||
{
|
||||
FfmpegScanDictionary(stream.metadata, &handler, handler_ctx);
|
||||
FfmpegScanDictionary(stream.metadata, handler, handler_ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -401,7 +401,7 @@ FfmpegScanMetadata(const AVFormatContext &format_context, int audio_stream,
|
||||
{
|
||||
assert(audio_stream >= 0);
|
||||
|
||||
FfmpegScanDictionary(format_context.metadata, &handler, handler_ctx);
|
||||
FfmpegScanDictionary(format_context.metadata, handler, handler_ctx);
|
||||
FfmpegScanMetadata(*format_context.streams[audio_stream],
|
||||
handler, handler_ctx);
|
||||
}
|
||||
@@ -627,7 +627,7 @@ FfmpegScanStream(AVFormatContext &format_context,
|
||||
|
||||
const AVStream &stream = *format_context.streams[audio_stream];
|
||||
if (stream.duration != (int64_t)AV_NOPTS_VALUE)
|
||||
tag_handler_invoke_duration(&handler, handler_ctx,
|
||||
tag_handler_invoke_duration(handler, handler_ctx,
|
||||
FromFfmpegTime(stream.duration,
|
||||
stream.time_base));
|
||||
|
||||
@@ -638,7 +638,7 @@ FfmpegScanStream(AVFormatContext &format_context,
|
||||
|
||||
static bool
|
||||
ffmpeg_scan_stream(InputStream &is,
|
||||
const TagHandler *handler, void *handler_ctx)
|
||||
const TagHandler &handler, void *handler_ctx)
|
||||
{
|
||||
AVInputFormat *input_format = ffmpeg_probe(nullptr, is);
|
||||
if (input_format == nullptr)
|
||||
@@ -653,7 +653,7 @@ ffmpeg_scan_stream(InputStream &is,
|
||||
if (f == nullptr)
|
||||
return false;
|
||||
|
||||
bool result = FfmpegScanStream(*f, *handler, handler_ctx);
|
||||
bool result = FfmpegScanStream(*f, handler, handler_ctx);
|
||||
avformat_close_input(&f);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user