-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFMpeg error with some flac files #10760
Comments
Doing some tests ffmpeg returns -1094995529 -> AVERROR_INVALIDDATA If would be nice if the library detected those negative values and at least throw a better error message. Now about the root issue, since those files does not give errors via other decoders would is make sense to handle invalid data at the end of the file and ignore it like some cases handled for mp3 ? |
@rohitjoins I've checked again and it's actually already there : https://github.com/google/ExoPlayer/blob/dev-v2/extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java#L114 The issue is at https://github.com/google/ExoPlayer/blob/dev-v2/extensions/ffmpeg/src/main/jni/ffmpeg_jni.cc#L286 the result is returned as raw ffmpeg value and not properly converted as https://github.com/google/ExoPlayer/blob/dev-v2/extensions/ffmpeg/src/main/jni/ffmpeg_jni.cc#L267 Edit: There's the same issue in other place in that decode function |
Fix confirmed made a PR |
@Tolriq Thank you for sending the PR. I agree with the fix in the error message and will accept the PR soon. Overriding behaviour of ffmpeg to handle invalid data seems tricky and hard to maintain in the future. I believe we should mirror the ffmpeg extension when enabled. |
@rohitjoins actually there's nothing more to do, the fix does return the proper code that is supported by the decoder and in the case of that file properly ignore the invalid data at the end of it. So simple fix to greatly improve resilience of the ffmpeg extension. |
… invalid result codes Imported from GitHub PR Issue: google/ExoPlayer#10762 This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand. The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover. The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones. Fixes: Issue: google/ExoPlayer#10760 Merge 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a into 972e169 COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a PiperOrigin-RevId: 487189910
…codes Imported from GitHub PR Issue: #10762 This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand. The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover. The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones. Fixes: Issue: #10760 Merge 82ceeb7 into 972e169 COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb7 PiperOrigin-RevId: 487189910
… invalid result codes Imported from GitHub PR Issue: google/ExoPlayer#10762 This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand. The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover. The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones. Fixes: Issue: google/ExoPlayer#10760 Merge 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a into 972e169 COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a PiperOrigin-RevId: 487189910 (cherry picked from commit a1c04cd)
…codes Imported from GitHub PR Issue: #10762 This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand. The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover. The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones. Fixes: Issue: #10760 Merge 82ceeb7 into 972e169 COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb7 PiperOrigin-RevId: 487189910 (cherry picked from commit 6d2e7a1)
ExoPlayer Version
2.18.1
Devices that reproduce the issue
All
Devices that do not reproduce the issue
None
Reproducible in the demo app?
Not tested
Reproduction steps
Play the file send by mail with the ffmpeg extension enabled.
Skip or wait until near the end of the file and see an error.
Expected result
No error (And no error with default Android mediacodec)
Actual result
Media
Send by mail.
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: