refactor(ffmpeg): use float for FPS
* refactor(ffmpeg): use float for FPS * test: update golden files
This commit is contained in:
parent
2cf461421d
commit
5ff3407305
7 changed files with 17 additions and 17 deletions
|
|
@ -23,16 +23,16 @@ const (
|
|||
)
|
||||
|
||||
type Metadata struct {
|
||||
Orientation int `json:"orientation"`
|
||||
Duration int `json:"duration,omitempty"`
|
||||
Width int `json:"width,omitempty"`
|
||||
Height int `json:"height,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Artist string `json:"artist,omitempty"`
|
||||
FPS int `json:"fps,omitempty"`
|
||||
SelectedFrame int `json:"selected_frame,omitempty"`
|
||||
HasVideo bool `json:"has_video"`
|
||||
HasAudio bool `json:"has_audio"`
|
||||
Orientation int `json:"orientation"`
|
||||
Duration int `json:"duration,omitempty"`
|
||||
Width int `json:"width,omitempty"`
|
||||
Height int `json:"height,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Artist string `json:"artist,omitempty"`
|
||||
FPS float64 `json:"fps,omitempty"`
|
||||
SelectedFrame int `json:"selected_frame,omitempty"`
|
||||
HasVideo bool `json:"has_video"`
|
||||
HasAudio bool `json:"has_audio"`
|
||||
}
|
||||
|
||||
type AVContext struct {
|
||||
|
|
@ -139,7 +139,7 @@ func (av *AVContext) Metadata() *Metadata {
|
|||
Height: av.height,
|
||||
Title: av.title,
|
||||
Artist: av.artist,
|
||||
FPS: int(math.Round(fps)),
|
||||
FPS: math.Round(fps*10) / 10,
|
||||
SelectedFrame: selectedFrame,
|
||||
HasVideo: av.hasVideo,
|
||||
HasAudio: av.hasAudio,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue