Fix #28949: can't render video to Flash
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2011 10:26:37 +0000 (10:26 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2011 10:26:37 +0000 (10:26 +0000)
Several issues were discovered when was looking into this bug:

- MPEG file format didn't set needed codec settings such as frame
  rate and so, Was caused by not very correct fix fix #21351.
- "Expert" codec settings stored in idprops was affected on
  formats which don't actually need them causing some conflicts
  in codec settings.
- Flash codec doesn't support b-frames.

Now C presets shouldn't affect on each other and flash coded wouldn't
use b-frames even when using h264 format. Should work fine for files
created from scratch. If existing files fails to render, try to
switch file format to something else and then back to needed value.

source/blender/blenkernel/intern/writeffmpeg.c

index da1412dac0db1aad728678561ba428f14a9c356f..bdca3c8e6186b497f6892125965679199bfe31b6 100644 (file)
@@ -1102,7 +1102,7 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int
                idp_type = IDP_FLOAT;
                break;
        case FF_OPT_TYPE_STRING:
-               val.str = (char *)"                                                                               ";
+               val.str = "                                                                               ";
                idp_type = IDP_STRING;
                break;
        case FF_OPT_TYPE_CONST:
@@ -1377,3 +1377,4 @@ void ffmpeg_verify_image_type(RenderData *rd)
 }
 
 #endif
+