annotate pnm.h @ 7272:643c85503f1f libavcodec

strdup() the default value for rc_eq in AVCodec when setting it in avcodec_get_context_defaults(). The value has to be alloced dinamically rather than statically since it may be freed for example by av_set_string2(). Fix a segmentation fault.
author stefano
date Sun, 13 Jul 2008 21:44:00 +0000
parents 1d83e9c34641
children c4a4495715dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4978
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
1 /*
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
2 * PNM image format
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
3 * Copyright (c) 2002, 2003 Fabrice Bellard.
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
4 *
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
5 * This file is part of FFmpeg.
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
6 *
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
11 *
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
15 * Lesser General Public License for more details.
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
16 *
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
20 */
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
21
5830
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 4978
diff changeset
22 #ifndef FFMPEG_PNM_H
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 4978
diff changeset
23 #define FFMPEG_PNM_H
4978
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
24
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
25 #include "avcodec.h"
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
26
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
27 typedef struct PNMContext {
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
28 uint8_t *bytestream;
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
29 uint8_t *bytestream_start;
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
30 uint8_t *bytestream_end;
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
31 AVFrame picture;
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
32 int maxval; ///< maximum value of a pixel
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
33 } PNMContext;
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
34
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
35 int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s);
95934eef9589 move pnm parser in its own file
aurel
parents:
diff changeset
36
5830
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 4978
diff changeset
37 #endif /* FFMPEG_PNM_H */