diff options
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2117,7 +2117,7 @@ static void open_parser(AVFormatContext *s, int i) codec = avcodec_find_decoder(st->codec->codec_id); if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) { st->codec->parse_only = 1; - if (avcodec_open(st->codec, codec) < 0) + if (avcodec_open2(st->codec, codec, NULL) < 0) st->codec->parse_only = 0; } } @@ -3468,7 +3468,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop if (!fst) return NULL; if (copy) { - fst->codec= avcodec_alloc_context(); + fst->codec = avcodec_alloc_context3(NULL); memcpy(fst->codec, codec, sizeof(AVCodecContext)); if (codec->extradata_size) { fst->codec->extradata = av_malloc(codec->extradata_size); @@ -3885,7 +3885,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) st = av_mallocz(sizeof(AVStream)); if (!st) return; - st->codec = avcodec_alloc_context(); + st->codec = avcodec_alloc_context3(NULL); stream->streams[stream->nb_streams++] = st; memcpy(st->codec, av, sizeof(AVCodecContext)); } |