summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/bmv.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/bmv.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/bmv.c')
-rw-r--r--ffmpeg/libavcodec/bmv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ffmpeg/libavcodec/bmv.c b/ffmpeg/libavcodec/bmv.c
index 2628e4a..baa1c8b 100644
--- a/ffmpeg/libavcodec/bmv.c
+++ b/ffmpeg/libavcodec/bmv.c
@@ -2,20 +2,20 @@
* Discworld II BMV video and audio decoder
* Copyright (c) 2011 Konstantin Shishkov
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -139,7 +139,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
mode += 1 + advance_mode;
if (mode >= 4)
mode -= 3;
- if (FFABS(dst_end - dst) < len)
+ if (len <= 0 || FFABS(dst_end - dst) < len)
return AVERROR_INVALIDDATA;
switch (mode) {
case 1:
@@ -340,21 +340,21 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_bmv_video_decoder = {
.name = "bmv_video",
+ .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_BMV_VIDEO,
.priv_data_size = sizeof(BMVDecContext),
.init = decode_init,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
};
AVCodec ff_bmv_audio_decoder = {
.name = "bmv_audio",
+ .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_BMV_AUDIO,
.init = bmv_aud_decode_init,
.decode = bmv_aud_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
};