mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-24 09:23:37 +08:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: presets: rename presets directory lavc: make avcodec_get_context_defaults3 "officially" public lavf: replace av_new_stream->avformat_new_stream part II. lavf,lavd: replace av_new_stream->avformat_new_stream part I. lavf: add avformat_new_stream as a replacement for av_new_stream. Use correct scaling table for bwd-pred MVs in second B-field Ut Video decoder Makefile: change presets extension to .avpreset lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs lavfi: add testsrc source AVOptions: add documentation. presets: update libx264 ffpresets Conflicts: Changelog doc/APIchanges doc/ffmpeg.texi ffpresets/libx264-ipod320.ffpreset ffpresets/libx264-ipod640.ffpreset ffserver.c libavcodec/avcodec.h libavcodec/options.c libavcodec/version.h libavdevice/libdc1394.c libavfilter/avfilter.h libavfilter/vsrc_testsrc.c libavformat/flvdec.c libavformat/riff.c libavformat/version.h libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2762,7 +2762,17 @@ void av_close_input_file(AVFormatContext *s)
|
||||
avio_close(pb);
|
||||
}
|
||||
|
||||
#if FF_API_NEW_STREAM
|
||||
AVStream *av_new_stream(AVFormatContext *s, int id)
|
||||
{
|
||||
AVStream *st = avformat_new_stream(s, NULL);
|
||||
if (st)
|
||||
st->id = id;
|
||||
return st;
|
||||
}
|
||||
#endif
|
||||
|
||||
AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
|
||||
{
|
||||
AVStream *st;
|
||||
int i;
|
||||
@@ -2783,13 +2793,12 @@ AVStream *av_new_stream(AVFormatContext *s, int id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
st->codec = avcodec_alloc_context3(NULL);
|
||||
st->codec = avcodec_alloc_context3(c);
|
||||
if (s->iformat) {
|
||||
/* no default bitrate if decoding */
|
||||
st->codec->bit_rate = 0;
|
||||
}
|
||||
st->index = s->nb_streams;
|
||||
st->id = id;
|
||||
st->start_time = AV_NOPTS_VALUE;
|
||||
st->duration = AV_NOPTS_VALUE;
|
||||
/* we set the current DTS to 0 so that formats without any timestamps
|
||||
|
||||
Reference in New Issue
Block a user