[FFmpeg-trac] #8508(undetermined:new): mp4 - STSC entry 1 is invalid
FFmpeg
trac at avcodec.org
Mon Feb 3 19:46:26 EET 2020
#8508: mp4 - STSC entry 1 is invalid
-------------------------------------+-------------------------------------
Reporter: jbagg | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Some mp4 audio files are not readable. Example attached. If I comment
out the invalid data error return in mov_read_trak() in libavformat/mov.c,
the attached file plays without error. Both VLC and win 10 builtin player
can play the attached. I tested with with ffmpeg versions head, 4.2 and
3.6. The attached file errors out on all 3 versions tested.
{{{
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 589576b..95d57e3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4224,7 +4224,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext
*pb, MOVAtom atom)
if (sc->stsc_count && sc->stsc_data[ sc->stsc_count - 1 ].first >
sc->chunk_count) {
av_log(c->fc, AV_LOG_ERROR, "stream %d, contradictionary STSC and
STCO\n",
st->index);
- return AVERROR_INVALIDDATA;
+// return AVERROR_INVALIDDATA;
}
fix_timescale(c, sc);
}}}
How to reproduce:
{{{
./ffprobe ../STSC_entry_1_is_invalid_13_Glass.m4a
ffprobe version n4.2.2-1-g19bfd72126 Copyright (c) 2007-2019 the FFmpeg
developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --disable-shared --enable-static
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56431e165d80] STSC entry 1 is invalid
(first=43 count=0 id=1)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56431e165d80] stream 0, contradictionary STSC
and STCO
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56431e165d80] error reading header
../STSC_entry_1_is_invalid_13_Glass.m4a: Invalid data found when
processing input
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8508>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list