mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
The original test only mapped the source file and printed its content, exercising none of the error branches in av_file_map(). Replace it with a test that maps a real file (path via argv[1] for out-of-tree builds) and verifies it is non-empty, then calls av_file_map() on a nonexistent file twice: once with log_offset=0 to confirm the error is logged at AV_LOG_ERROR, and once with log_offset=1 to confirm the level is raised by one, covering the log_level_offset_offset path in av_vlog(). A custom av_log callback captures the emitted level independently of the global log level. The two error cases share a single for() loop to avoid duplication. Add a FATE entry in tests/fate/libavutil.mak with CMP=null since there is no fixed stdout to compare. Signed-off-by: Soham Kute <officialsohamkute@gmail.com>