annotate bethsoftvideo.h @ 12494:94eaea836bf4 libavcodec

Check avctx width/height more thoroughly (e.g. all values 0 except width would have been accepted before). Also do not fail if they are invalid but instead override them to 0. This allows decoding e.g. MPEG video when only the container values are corrupted. For encoding a value of 0,0 of course makes no sense, but was allowed through before and will be caught by an extra check in the encode function.
author reimar
date Wed, 15 Sep 2010 04:46:55 +0000
parents c4a4495715dd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5212
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
1 /*
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
2 * Bethesda VID video decoder
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
3 * Copyright (C) 2007 Nicholas Tung
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
4 *
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
5 * This file is part of FFmpeg.
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
6 *
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
9 * License as published by the Free Software Foundation; either
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
11 *
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
15 * Lesser General Public License for more details.
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
16 *
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
20 */
12b08ebc40b9 Add missing license header.
diego
parents: 5169
diff changeset
21
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
22 #ifndef AVCODEC_BETHSOFTVIDEO_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
23 #define AVCODEC_BETHSOFTVIDEO_H
5163
9ecbfc0c82bf add multiple inclusion guards to headers
mru
parents: 4818
diff changeset
24
4803
35e47a6e01e2 Bethsoft VID demuxer and video decoder
diego
parents:
diff changeset
25 enum BethsoftVidBlockType
35e47a6e01e2 Bethsoft VID demuxer and video decoder
diego
parents:
diff changeset
26 {
4818
2137206961c9 align vertically
michael
parents: 4812
diff changeset
27 PALETTE_BLOCK = 0x02,
2137206961c9 align vertically
michael
parents: 4812
diff changeset
28 FIRST_AUDIO_BLOCK = 0x7c,
2137206961c9 align vertically
michael
parents: 4812
diff changeset
29 AUDIO_BLOCK = 0x7d,
4812
d9cff0d54fdd use shorter names for the block type enum
michael
parents: 4811
diff changeset
30 VIDEO_I_FRAME = 0x03,
d9cff0d54fdd use shorter names for the block type enum
michael
parents: 4811
diff changeset
31 VIDEO_P_FRAME = 0x01,
d9cff0d54fdd use shorter names for the block type enum
michael
parents: 4811
diff changeset
32 VIDEO_YOFF_P_FRAME = 0x04,
d9cff0d54fdd use shorter names for the block type enum
michael
parents: 4811
diff changeset
33 EOF_BLOCK = 0x14,
4803
35e47a6e01e2 Bethsoft VID demuxer and video decoder
diego
parents:
diff changeset
34 };
5163
9ecbfc0c82bf add multiple inclusion guards to headers
mru
parents: 4818
diff changeset
35
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
36 #endif /* AVCODEC_BETHSOFTVIDEO_H */