mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
lavf: move force_codec_ids() up
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
98ce9b8468
commit
3a6b6f425e
@ -659,6 +659,21 @@ fail:
|
|||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
||||||
|
static void force_codec_ids(AVFormatContext *s, AVStream *st)
|
||||||
|
{
|
||||||
|
switch(st->codec->codec_type){
|
||||||
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
|
if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
|
||||||
|
break;
|
||||||
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
|
if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
|
||||||
|
break;
|
||||||
|
case AVMEDIA_TYPE_SUBTITLE:
|
||||||
|
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
|
static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
|
||||||
{
|
{
|
||||||
if(st->request_probe>0){
|
if(st->request_probe>0){
|
||||||
@ -703,21 +718,6 @@ no_packet:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void force_codec_ids(AVFormatContext *s, AVStream *st)
|
|
||||||
{
|
|
||||||
switch(st->codec->codec_type){
|
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
|
||||||
if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
|
||||||
if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
|
|
||||||
break;
|
|
||||||
case AVMEDIA_TYPE_SUBTITLE:
|
|
||||||
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
Loading…
Reference in New Issue
Block a user