User Tools

Site Tools


ffmpeg:av_new_stream

av_new_stream

Overview

Defined in avformat.h

Add a new stream to a media file.

Can only be called in the read_header() function. If the flag AVFMTCTX_NOHEADER is in the format context, then new streams can be added in av_read_packet() too.

AVStream *av_new_stream(AVFormatContext *s,
                        int id);

Parameters

s

AVFormatContext *s

Media file handle, contained in a AVFormatContext pointer.

id

int id

File format dependent stream id.
See av_find_default_stream_index() for more info.

Return value

A pointer to the new AVStream or NULL upon failure.

See also

ffmpeg/av_new_stream.txt · Last modified: 2007/12/10 10:21 by deva