Skip to content

Commit

Permalink
chore: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Apr 4, 2024
1 parent dd11933 commit c55eda4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 0 additions & 3 deletions mp4/boxsr.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ LoopBoxes:
return nil, err
}
boxType, boxSize := box.Type(), box.Size()
if err != nil {
return nil, err
}
switch boxType {
case "mdat":
if f.isFragmented {
Expand Down
12 changes: 3 additions & 9 deletions mp4/initsegment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ const pps1nalu = "685bdf20"
func parseInitFile(fileName string) (*File, error) {
fd, err := os.Open(fileName)
if err != nil {
if err != nil {
return nil, err
}
return nil, err
}
defer fd.Close()

f, err := DecodeFile(fd)
if err != io.EOF && err != nil {
if err != nil {
return nil, err
}
return nil, err
}
if f.IsFragmented() && f.Init.Ftyp == nil {
return nil, fmt.Errorf("No ftyp present")
Expand Down Expand Up @@ -175,9 +171,7 @@ func TestGenerateInitSegment(t *testing.T) {

initRead, err := DecodeFile(&buf)
if err != io.EOF && err != nil {
if err != nil {
t.Error(err)
}
t.Error(err)
}
if initRead.Moov.Size() != init.Moov.Size() {
t.Errorf("Mismatch generated vs read moov size: %d != %d", init.Moov.Size(), initRead.Moov.Size())
Expand Down

0 comments on commit c55eda4

Please sign in to comment.