aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-02 01:15:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-02 01:17:36 +0100
commit3a6b6f425ee3f552eaaf6bde7480be5cb38aba1d (patch)
tree42a819022819b17a8af039c370bb0b3f1fd357b5
parent98ce9b84681bd4b8679bb25889e8f487c35e3ed3 (diff)
downloadffmpeg-3a6b6f425ee3f552eaaf6bde7480be5cb38aba1d.tar.gz
lavf: move force_codec_ids() up
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a78da36ec1..0e8e05ae83 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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)
{
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 ret, i;