11//! Script data structures
22
3- use std:: collections:: BTreeMap ;
3+ use std:: collections:: HashMap ;
44use std:: io;
55
66use bytes:: Bytes ;
@@ -152,7 +152,7 @@ pub struct OnMetaData<'a> {
152152 pub video_track_id_info_map : Option < Amf0Object < ' a > > ,
153153 /// Any other metadata contained in the script data.
154154 #[ serde( flatten, borrow) ]
155- pub other : BTreeMap < StringCow < ' a > , Amf0Value < ' a > > ,
155+ pub other : HashMap < StringCow < ' a > , Amf0Value < ' a > > ,
156156}
157157
158158/// XMP Metadata
@@ -169,7 +169,7 @@ pub struct OnXmpData<'a> {
169169 live_xml : Option < String > ,
170170 /// Any other metadata contained in the script data.
171171 #[ serde( flatten, borrow) ]
172- other : BTreeMap < StringCow < ' a > , Amf0Value < ' a > > ,
172+ other : HashMap < StringCow < ' a > , Amf0Value < ' a > > ,
173173}
174174
175175/// FLV `SCRIPTDATA` tag
@@ -279,7 +279,7 @@ mod tests {
279279 width: Some ( 1280.0 ) ,
280280 audio_track_id_info_map: None ,
281281 video_track_id_info_map: None ,
282- other: BTreeMap :: new( ) ,
282+ other: HashMap :: new( ) ,
283283 }
284284 ) ;
285285 }
@@ -351,7 +351,7 @@ mod tests {
351351 width: Some ( 1280.0 ) ,
352352 audio_track_id_info_map: Some ( [ ( "test" . into( ) , Amf0Value :: Number ( 1.0 ) ) ] . into_iter( ) . collect( ) ) ,
353353 video_track_id_info_map: Some ( [ ( "test2" . into( ) , Amf0Value :: Number ( 2.0 ) ) ] . into_iter( ) . collect( ) ) ,
354- other: BTreeMap :: new( ) ,
354+ other: HashMap :: new( ) ,
355355 }
356356 ) ;
357357 }
0 commit comments