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