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:
authorDaniel Genrich <daniel.genrich@gmx.net>2014-10-23 17:12:28 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2014-10-23 17:12:28 +0400
commit9ff1ebed52e0f858a395eeea4caf89304e068b2d (patch)
treeb05d0f4b229de61b088a128ad412dd7bba347928 /source/blender/blenkernel/intern/writeffmpeg.c
parenta2ed11c6eeab5fab8cb81e32e1c68fdafdd5dbbc (diff)
parenteaaeae469968c5c78a5d7e6d202f1af00b382a79 (diff)
Merge remote-tracking branch 'origin/master' into soc-2014-fluid
Conflicts: .gitignore intern/cycles/CMakeLists.txt source/blender/blenkernel/intern/smoke.c source/blender/python/intern/bpy_interface.c source/creator/CMakeLists.txt
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index dbceba288c7..739db7b7bdb 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -30,13 +30,6 @@
#include <string.h>
#include <stdio.h>
-#if defined(_WIN32) && defined(DEBUG) && !defined(__MINGW32__) && !defined(__CYGWIN__)
-/* This does not seem necessary or present on MSVC 8, but may be needed in earlier versions? */
-#if _MSC_VER < 1400
-#include <stdint.h>
-#endif
-#endif
-
#include <stdlib.h>
#include <libavformat/avformat.h>
@@ -105,6 +98,7 @@ static AUD_Device *audio_mixdown_device = 0;
static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value);
static void ffmpeg_dict_set_float(AVDictionary **dict, const char *key, float value);
+static void ffmpeg_set_expert_options(RenderData *rd);
/* Delete a picture buffer */
@@ -422,6 +416,11 @@ static AVFrame *generate_video_frame(uint8_t *pixels, ReportList *reports)
current_frame->data, current_frame->linesize);
delete_picture(rgb_frame);
}
+
+ current_frame->format = PIX_FMT_BGR32;
+ current_frame->width = width;
+ current_frame->height = height;
+
return current_frame;
}
@@ -488,6 +487,19 @@ static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char
void *iter;
IDProperty *curr;
+ /* TODO(sergey): This is actually rather stupid, because changing
+ * codec settings in render panel would also set expert options.
+ *
+ * But we need ti here in order to get rid of deprecated settings
+ * when opening old files in new blender.
+ *
+ * For as long we don't allow editing properties in the interface
+ * it's all good. bug if we allow editing them, we'll need to
+ * repace it with some smarter code which would port settings
+ * from deprecated to new one.
+ */
+ ffmpeg_set_expert_options(rd);
+
if (!rd->ffcodecdata.properties) {
return;
}
@@ -684,12 +696,12 @@ static AVStream *alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
}
if (codec->sample_fmts) {
- /* check if the prefered sample format for this codec is supported.
+ /* check if the preferred sample format for this codec is supported.
* this is because, depending on the version of libav, and with the whole ffmpeg/libav fork situation,
* you have various implementations around. float samples in particular are not always supported.
*/
const enum AVSampleFormat *p = codec->sample_fmts;
- for (; *p!=-1; p++) {
+ for (; *p != -1; p++) {
if (*p == st->codec->sample_fmt)
break;
}