[FFmpeg-trac] #9185(avformat:new): ffmpeg flac decoder incorrectly finds junk frame
FFmpeg
trac at avcodec.org
Wed May 26 14:30:16 EEST 2021
#9185: ffmpeg flac decoder incorrectly finds junk frame
-------------------------------------+-------------------------------------
Reporter: Mattias | Owner: (none)
Wadman |
Type: defect | Status: new
Priority: important | Component: avformat
Version: git-master | Resolution:
Keywords: flac | Blocked By:
regression |
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Mattias Wadman):
-threads 1 makes flac_junk_frame_issue2.flac work for me also. I wonder if
i'm seeing more than one issue as I managed cut out a small reproduction
case for another flac file with similar error and warnings. In that case
using -threads 1 does not seem to fix the issue.
Attaching an additional reproduction file
{{{
/build # flac -t flac_junk_frame_issue3.flac
flac 1.3.3
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are
welcome to redistribute it under certain conditions. Type `flac' for
details.
flac_junk_frame_issue3.flac: ok
/build # ./ffmpeg_g -threads 1 -v trace -i flac_junk_frame_issue3.flac -f
null -
ffmpeg version N-102608-g7a879cce37 Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 10.2.1 (Alpine 10.2.1_pre1) 20201203
configuration: --enable-debug --disable-optimizations
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 2.101 / 59. 2.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
Splitting the commandline.
Reading option '-threads' ... matched as AVOption 'threads' with argument
'1'.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'trace'.
Reading option '-i' ... matched as input url with argument
'flac_junk_frame_issue3.flac'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input url flac_junk_frame_issue3.flac.
Successfully parsed a group of options.
Opening an input file: flac_junk_frame_issue3.flac.
[NULL @ 0x7f9697dbb040] Opening 'flac_junk_frame_issue3.flac' for reading
[file @ 0x7f9697e53500] Setting default whitelist 'file,crypto,data'
Probing flac score:100 size:2048
[flac @ 0x7f9697dbb040] Format flac probed with size=2048 and score=100
[flac @ 0x7f9697dbb040] Before avformat_find_stream_info() pos: 8286 bytes
read:11674 seeks:0 nb_streams:1
[flac @ 0x7f9697dba040] Junk frame till offset 3158
[flac @ 0x7f9697dba040] Inconsistent channel configuration.
[flac @ 0x7f9697dba040] get_buffer() failed
[flac @ 0x7f9697dba040] thread_get_buffer() failed
[flac @ 0x7f9697dbb040] stream 0: start_time: NOPTS duration: 0.0980045
[flac @ 0x7f9697dbb040] format: start_time: NOPTS duration: 0.098005
(estimate from stream) bitrate=952 kb/s
[flac @ 0x7f9697dbb040] After avformat_find_stream_info() pos: 11674 bytes
read:11674 seeks:0 frames:3
Input #0, flac, from 'flac_junk_frame_issue3.flac':
Metadata:
encoder : Lavf59.2.101
Duration: 00:00:00.10, bitrate: 952 kb/s
Stream #0:0, 3, 1/44100: Audio: flac, 44100 Hz, 2 channels
(FL+FR+BL+BR), s32 (24 bit)
Successfully opened the file.
Parsing a group of options: output url -.
Applying option f (force format) with argument null.
Successfully parsed a group of options.
Opening an output file: -.
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless
if it occurs once at the start per stream)
detected 2 logical cores
[graph_0_in_0_0 @ 0x7f9697db3500] Setting 'time_base' to value '1/44100'
[graph_0_in_0_0 @ 0x7f9697db3500] Setting 'sample_rate' to value '44100'
[graph_0_in_0_0 @ 0x7f9697db3500] Setting 'sample_fmt' to value 's32'
[graph_0_in_0_0 @ 0x7f9697db3500] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 0x7f9697db3500] tb:1/44100 samplefmt:s32
samplerate:44100 chlayout:0x3
[format_out_0_0 @ 0x7f9697db3940] Setting 'sample_fmts' to value 's16'
[format_out_0_0 @ 0x7f9697db3940] auto-inserting filter 'auto_resampler_0'
between the filter 'Parsed_anull_0' and the filter 'format_out_0_0'
[AVFilterGraph @ 0x7f9697db4680] query_formats: 4 queried, 6 merged, 3
already done, 0 delayed
[auto_resampler_0 @ 0x7f9697db2c00] [SWR @ 0x7f9697d39040] Using fltp
internally between filters
[auto_resampler_0 @ 0x7f9697db2c00] ch:2 chl:stereo fmt:s32 r:44100Hz ->
ch:2 chl:stereo fmt:s16 r:44100Hz
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf59.2.101
Stream #0:0, 0, 1/44100: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411
kb/s
Metadata:
encoder : Lavc59.1.100 pcm_s16le
[flac @ 0x7f9697db9040] invalid residualeed=1.23e+04x
[flac @ 0x7f9697db9040] decode_frame() failed
Error while decoding stream #0:0: Invalid data found when processing input
[flac @ 0x7f9697db9040] switching bps mid-stream is not supported
[flac @ 0x7f9697db9040] decode_frame() failed
Error while decoding stream #0:0: Invalid data found when processing input
[out_0_0 @ 0x7f9697db3840] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.
size=N/A time=00:00:00.09 bitrate=N/A speed=40.4x
video:0kB audio:17kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input file #0 (flac_junk_frame_issue3.flac):
Input stream #0:0 (audio): 3 packets read (6776 bytes); 1 frames decoded
(4322 samples);
Total: 3 packets (6776 bytes) demuxed
Output file #0 (pipe:):
Output stream #0:0 (audio): 1 frames encoded (4322 samples); 1 packets
muxed (17288 bytes);
Total: 1 packets (17288 bytes) muxed
1 frames successfully decoded, 2 decoding errors
[AVIOContext @ 0x7f9697dbb840] Statistics: 11674 bytes read, 0 seeks
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9185#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list