1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
22
24 {
26 int ret = 0;
27
29 if (!iformat && !format)
33
34 if (!iformat)
38 goto error;
39 }
45 goto error;
46 }
50 }
51 } else
53
55 return 0;
56 error:
58 return ret;
59 }
int ff_alloc_input_device_context(AVFormatContext **avctx, AVInputFormat *iformat, const char *format)
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
#define AV_IS_INPUT_DEVICE(category)
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
AVClassCategory category
Category used for visualization (like color) This is only set if the category is equal for all object...
AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
static AVInputFormat * iformat
static const char * format
Describe the class of an AVClass context structure.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
struct AVInputFormat * iformat
The input container format.
void * priv_data
Format private data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...