mirror of
https://github.com/zergon321/reisen.git
synced 2025-10-06 00:06:54 +08:00
Skip fix.
This commit is contained in:
@@ -5,4 +5,5 @@ type ErrorType int
|
|||||||
const (
|
const (
|
||||||
ErrorAgain ErrorType = -11
|
ErrorAgain ErrorType = -11
|
||||||
ErrorInvalidValue ErrorType = -22
|
ErrorInvalidValue ErrorType = -22
|
||||||
|
ErrorEndOfFile ErrorType = -541478725
|
||||||
)
|
)
|
||||||
|
@@ -164,6 +164,8 @@ func (stream *baseStream) read() (bool, error) {
|
|||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream.skip = false
|
||||||
|
|
||||||
// No packets anymore.
|
// No packets anymore.
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
@@ -178,6 +180,8 @@ func (stream *baseStream) read() (bool, error) {
|
|||||||
stream.codecCtx, stream.packet)
|
stream.codecCtx, stream.packet)
|
||||||
|
|
||||||
if status < 0 {
|
if status < 0 {
|
||||||
|
stream.skip = false
|
||||||
|
|
||||||
return false, fmt.Errorf(
|
return false, fmt.Errorf(
|
||||||
"%d: couldn't send the packet to the codec context", status)
|
"%d: couldn't send the packet to the codec context", status)
|
||||||
}
|
}
|
||||||
@@ -191,6 +195,8 @@ func (stream *baseStream) read() (bool, error) {
|
|||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream.skip = false
|
||||||
|
|
||||||
return false, fmt.Errorf(
|
return false, fmt.Errorf(
|
||||||
"%d: couldn't receive the frame from the codec context", status)
|
"%d: couldn't receive the frame from the codec context", status)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user