[FLVTool2-users] a fix for my problem

Emmett Shear emmett.shear at gmail.com
Sat Jan 20 02:07:36 EST 2007

So I walked through the code with the ruby debugger and i think I
figured out what was causing the error.

The accessor was for :meta_data, and the code assigned to @metadata.
Additionally the code that was reading the metadata attribute was
expecting a hash (line 138 of stream.rb), but @meta_data (the
corrected instance variable) contained an object with instance
variables set instead of a hash.

so I replaced:

@metadata = meta_data_stream.read__AMF_data


@meta_data = {}
 md = meta_data_stream.read__AMF_data
 md.instance_variables.each do |var|
     var.gsub! "@", ""
     @meta_data[var] = md.instance_variable_get(var)


More information about the Flvtool2-users mailing list