File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ pub extern "C" fn rr_video_asset_read_frame_timestamps_nanos(
16
16
CError :: unexpected_null ( "video_bytes" ) . write_error ( error) ;
17
17
return std:: ptr:: null_mut ( ) ;
18
18
}
19
+ if video_bytes_len == 0 {
20
+ CError :: new ( CErrorCode :: VideoLoadError , "Zero video bytes" ) . write_error ( error) ;
21
+ return std:: ptr:: null_mut ( ) ;
22
+ }
19
23
let Some ( alloc_func) = alloc_func else {
20
24
CError :: unexpected_null ( "alloc_func" ) . write_error ( error) ;
21
25
return std:: ptr:: null_mut ( ) ;
@@ -44,7 +48,7 @@ pub extern "C" fn rr_video_asset_read_frame_timestamps_nanos(
44
48
Err ( err) => {
45
49
CError :: new (
46
50
CErrorCode :: VideoLoadError ,
47
- & format ! ( "Failed to play video: {err}" ) ,
51
+ & format ! ( "Failed to load video: {err}" ) ,
48
52
)
49
53
. write_error ( error) ;
50
54
return std:: ptr:: null_mut ( ) ;
You can’t perform that action at this time.
0 commit comments