[FFmpeg-cvslog] lavf: move force_codec_ids() up
Michael Niedermayer
git at videolan.org
Wed Jan 2 02:43:26 CET 2013
ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 2 01:15:06 2013 +0100| [bc1e72c38ead1d3c71a99d714ef68894b8dffd0a] | committer: Carl Eugen Hoyos
lavf: move force_codec_ids() up
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 3a6b6f425ee3f552eaaf6bde7480be5cb38aba1d)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc1e72c38ead1d3c71a99d714ef68894b8dffd0a
---
libavformat/utils.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index be73c4a..eab0792 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -676,6 +676,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){
@@ -720,21 +735,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;
More information about the ffmpeg-cvslog
mailing list