| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Electronic Arts Madcow Video Decoder | 2 * Electronic Arts Madcow Video Decoder |
| 3 * Copyright (c) 2007-2009 Peter Ross | 3 * Copyright (c) 2007-2009 Peter Ross |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 av_reduce(&avctx->time_base.num, &avctx->time_base.den, | 255 av_reduce(&avctx->time_base.num, &avctx->time_base.den, |
| 256 AV_RL16(&buf[6]), 1000, 1<<30); | 256 AV_RL16(&buf[6]), 1000, 1<<30); |
| 257 | 257 |
| 258 s->width = AV_RL16(&buf[8]); | 258 s->width = AV_RL16(&buf[8]); |
| 259 s->height = AV_RL16(&buf[10]); | 259 s->height = AV_RL16(&buf[10]); |
| 260 calc_intra_matrix(t, buf[13]); | 260 calc_intra_matrix(t, buf[13]); |
| 261 buf += 16; | 261 buf += 16; |
| 262 | 262 |
| 263 if (avctx->width != s->width || avctx->height != s->height) { | 263 if (avctx->width != s->width || avctx->height != s->height) { |
| 264 if (av_check_image_size(s->width, s->height, 0, avctx) < 0) | 264 if (av_image_check_size(s->width, s->height, 0, avctx) < 0) |
| 265 return -1; | 265 return -1; |
| 266 avcodec_set_dimensions(avctx, s->width, s->height); | 266 avcodec_set_dimensions(avctx, s->width, s->height); |
| 267 if (t->frame.data[0]) | 267 if (t->frame.data[0]) |
| 268 avctx->release_buffer(avctx, &t->frame); | 268 avctx->release_buffer(avctx, &t->frame); |
| 269 } | 269 } |
| 270 | 270 |
| 271 t->frame.reference = 1; | 271 t->frame.reference = 1; |
| 272 if (!t->frame.data[0]) { | 272 if (!t->frame.data[0]) { |
| 273 if (avctx->get_buffer(avctx, &t->frame) < 0) { | 273 if (avctx->get_buffer(avctx, &t->frame) < 0) { |
| 274 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 274 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 AVMEDIA_TYPE_VIDEO, | 311 AVMEDIA_TYPE_VIDEO, |
| 312 CODEC_ID_MAD, | 312 CODEC_ID_MAD, |
| 313 sizeof(MadContext), | 313 sizeof(MadContext), |
| 314 decode_init, | 314 decode_init, |
| 315 NULL, | 315 NULL, |
| 316 decode_end, | 316 decode_end, |
| 317 decode_frame, | 317 decode_frame, |
| 318 CODEC_CAP_DR1, | 318 CODEC_CAP_DR1, |
| 319 .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video") | 319 .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video") |
| 320 }; | 320 }; |
| OLD | NEW |