Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2006-03-07 23:01:12 +0300
committerPeter Schlaile <peter@schlaile.de>2006-03-07 23:01:12 +0300
commit327d413eb3c0c4cf07b71903eaa27e784be172c3 (patch)
tree9563098700eaa9f038dd476541ba71adf9d50e16 /source/blender/imbuf/intern/util.c
parent9ce587e2117dcb2340d75c4bfa2b6e3c1135254c (diff)
this patch features several cleanups and bugfixes for the sequencer:
- blur works again (this was a serious bug in gamwarp...) - seperates all sequence effects into a seperate file with a clean interface - thereby fixing some obscure segfaults - seperates the scope views into a seperate file - adds float support to all effects and scope views - removes a bad level call to open_plugin_seq - FFMPEG seeking improved a lot. - FFMPEG compiles with debian sarge version cleanly - Makes hdaudio seek and resample code really work
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r--source/blender/imbuf/intern/util.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index fdb1bed3870..56a03f56ce2 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -217,6 +217,18 @@ void do_init_ffmpeg()
}
}
+#ifdef FFMPEG_CODEC_IS_POINTER
+static AVCodecContext* get_codec_from_stream(AVStream* stream)
+{
+ return stream->codec;
+}
+#else
+static AVCodecContext* get_codec_from_stream(AVStream* stream)
+{
+ return &stream->codec;
+}
+#endif
+
static int isffmpeg (char *filename) {
AVFormatContext *pFormatCtx;
@@ -243,21 +255,14 @@ static int isffmpeg (char *filename) {
/* Find the first video stream */
videoStream=-1;
for(i=0; i<pFormatCtx->nb_streams; i++)
-#ifdef FFMPEG_CODEC_IS_POINTER
- if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
-#else
- if(pFormatCtx->streams[i]->codec.codec_type==CODEC_TYPE_VIDEO)
-#endif
+ if(get_codec_from_stream(pFormatCtx->streams[i])
+ ->codec_type==CODEC_TYPE_VIDEO)
{
videoStream=i;
break;
}
-#ifdef FFMPEG_CODEC_IS_POINTER
- pCodecCtx=pFormatCtx->streams[videoStream]->codec;
-#else
- pCodecCtx=&pFormatCtx->streams[videoStream]->codec;
-#endif
+ pCodecCtx = get_codec_from_stream(pFormatCtx->streams[videoStream]);
if(videoStream==-1) {
avcodec_close(pCodecCtx);
@@ -274,9 +279,6 @@ static int isffmpeg (char *filename) {
return 0;
}
- if(pCodec->capabilities & CODEC_CAP_TRUNCATED)
- pCodecCtx->flags|=CODEC_FLAG_TRUNCATED;
-
if(avcodec_open(pCodecCtx, pCodec)<0) {
avcodec_close(pCodecCtx);
av_close_input_file(pFormatCtx);