1 /*
2 * DVD subtitle decoding
3 * Copyright (c) 2005 Fabrice Bellard
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #include <string.h>
23
27
28 /* parser definition */
34
36 {
37 return 0;
38 }
39
42 const uint8_t **poutbuf,
int *poutbuf_size,
44 {
46
48 if (buf_size < 2 ||
AV_RB16(buf) && buf_size < 6) {
49 if (buf_size)
51 return buf_size;
52 }
54 if (pc->
packet_len == 0)
/* HD-DVD subpicture packet */
58 }
67 return buf_size;
68 }
69 } else {
70 /* erroneous size */
72 }
73 }
75 *poutbuf_size = 0;
76 return buf_size;
77 }
78
80 {
83 }
84
91 };
Memory handling functions.
static int dvdsub_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
static av_cold int dvdsub_parse_init(AVCodecParserContext *s)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVCodecParser ff_dvdsub_parser
Libavcodec external API header.
main external API structure.
static av_cold void dvdsub_parse_close(AVCodecParserContext *s)