* The flavor info needs to initialize the output format count to 0 too, as otherwise the addon server tries to allocate to much memory.
* Use a member variable for the input media_format Thx to Ingo for pointing this out git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24362 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,6 +18,10 @@ VideoWindowAddOn::VideoWindowAddOn(image_id id)
|
||||
: BMediaAddOn(id)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
fInputFormat.type = B_MEDIA_RAW_VIDEO;
|
||||
fInputFormat.u.raw_video = media_raw_video_format::wildcard;
|
||||
|
||||
fInfo.internal_id = 0;
|
||||
fInfo.name = strdup("VideoWindow Consumer");
|
||||
fInfo.info = strdup("This node displays a simple video window");
|
||||
@@ -25,10 +29,11 @@ VideoWindowAddOn::VideoWindowAddOn(image_id id)
|
||||
fInfo.flavor_flags = 0;
|
||||
fInfo.possible_count = 0;
|
||||
fInfo.in_format_count = 1;
|
||||
media_format *inFormat = new media_format;
|
||||
inFormat->type = B_MEDIA_RAW_VIDEO;
|
||||
inFormat->u.raw_video = media_raw_video_format::wildcard;
|
||||
fInfo.in_formats = inFormat;
|
||||
fInfo.in_format_flags = 0;
|
||||
fInfo.in_formats = &fInputFormat;
|
||||
fInfo.out_format_count = 0;
|
||||
fInfo.out_formats = 0;
|
||||
fInfo.out_format_flags = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
|
||||
private:
|
||||
flavor_info fInfo;
|
||||
media_format fInputFormat;
|
||||
};
|
||||
|
||||
extern "C" BMediaAddOn *make_media_addon(image_id id);
|
||||
|
||||
Reference in New Issue
Block a user