diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-12 04:21:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-16 03:30:27 +0100 |
commit | ebc9ff8e7d6e9b33a5839d027dd823cf83824d60 (patch) | |
tree | 95ba4e49ce53d3ccb0aa292f7adfbec5620209b2 /libavcodec/vorbisdec.c | |
parent | fa169d5650b2d9e9c3d43be16208bb94d873a803 (diff) | |
download | ffmpeg-streaming-ebc9ff8e7d6e9b33a5839d027dd823cf83824d60.zip ffmpeg-streaming-ebc9ff8e7d6e9b33a5839d027dd823cf83824d60.tar.gz |
vorbisdec: Check that the x values of floor1 are unique.
This is required by the spec and fixes video-1frag.ogg.48.ogg. (FPE)
Based on the debuging work of Oana Stratulat and ubitux.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r-- | libavcodec/vorbisdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 6bf785e..03e3d75 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -579,6 +579,14 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) // Precalculate order of x coordinates - needed for decode ff_vorbis_ready_floor1_list(floor_setup->data.t1.list, floor_setup->data.t1.x_list_dim); + + for (j=1; j<floor_setup->data.t1.x_list_dim; j++) { + if ( floor_setup->data.t1.list[ floor_setup->data.t1.list[j-1].sort ].x + == floor_setup->data.t1.list[ floor_setup->data.t1.list[j ].sort ].x) { + av_log(vc->avccontext, AV_LOG_ERROR, "Non unique x values in floor type 1\n"); + return AVERROR_INVALIDDATA; + } + } } else if (floor_setup->floor_type == 0) { unsigned max_codebook_dim = 0; |