You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/webm_chunk: Don't keep pointer to AVOutputFormat
It is no longer needed given that the function pointers of the child muxer's AVOutputFormat are no longer called directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -53,19 +53,23 @@ typedef struct WebMChunkContext {
|
|||||||
char *http_method;
|
char *http_method;
|
||||||
uint64_t duration_written;
|
uint64_t duration_written;
|
||||||
int64_t prev_pts;
|
int64_t prev_pts;
|
||||||
ff_const59 AVOutputFormat *oformat;
|
|
||||||
AVFormatContext *avf;
|
AVFormatContext *avf;
|
||||||
} WebMChunkContext;
|
} WebMChunkContext;
|
||||||
|
|
||||||
static int chunk_mux_init(AVFormatContext *s)
|
static int chunk_mux_init(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
WebMChunkContext *wc = s->priv_data;
|
WebMChunkContext *wc = s->priv_data;
|
||||||
|
ff_const59 AVOutputFormat *oformat;
|
||||||
AVFormatContext *oc;
|
AVFormatContext *oc;
|
||||||
AVStream *st, *ost = s->streams[0];
|
AVStream *st, *ost = s->streams[0];
|
||||||
AVDictionary *dict = NULL;
|
AVDictionary *dict = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = avformat_alloc_output_context2(&wc->avf, wc->oformat, NULL, NULL);
|
oformat = av_guess_format("webm", s->url, "video/webm");
|
||||||
|
if (!oformat)
|
||||||
|
return AVERROR_MUXER_NOT_FOUND;
|
||||||
|
|
||||||
|
ret = avformat_alloc_output_context2(&wc->avf, oformat, NULL, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
oc = wc->avf;
|
oc = wc->avf;
|
||||||
@@ -156,9 +160,6 @@ static int webm_chunk_write_header(AVFormatContext *s)
|
|||||||
if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; }
|
if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; }
|
||||||
|
|
||||||
wc->chunk_index = wc->chunk_start_index;
|
wc->chunk_index = wc->chunk_start_index;
|
||||||
wc->oformat = av_guess_format("webm", s->url, "video/webm");
|
|
||||||
if (!wc->oformat)
|
|
||||||
return AVERROR_MUXER_NOT_FOUND;
|
|
||||||
wc->prev_pts = AV_NOPTS_VALUE;
|
wc->prev_pts = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
ret = chunk_mux_init(s);
|
ret = chunk_mux_init(s);
|
||||||
|
Reference in New Issue
Block a user