Hello again,

I have some problems with decoding MPEG4 video streams after switching to
Libav 10. Sometimes the decoder works correctly without outputing any error
message but in many cases it outputs lots of errors and in some cases there
are no output frames at all. These are some examples of the output:

Correct run:
------------
[avi @ 0x7fce6c342cc0] Probed with size=2048 and score=100
st:1 removing common factor 384 from timebase
[avi @ 0x7fce6c342cc0] All info found
[AVAudioResampleContext @ 0x7fce6c3cfa80] audio_convert: found function:
s16p to s16  (C)
[AVAudioResampleContext @ 0x7fce6c3cfa80] audio_convert: found function:
s16p to s16  (SSE2)
[AVAudioResampleContext @ 0x7fce6c3cfa80] audio_convert: found function:
s16p to s16  (AVX)
[mpeg4 @ 0x7fce6c3432c0] detected 4 logical cores

Minor issue (damaged frames):
-----------------------------
[avi @ 0x7f74a03925c0] Probed with size=2048 and score=100
st:1 removing common factor 384 from timebase
[avi @ 0x7f74a03925c0] All info found
[AVAudioResampleContext @ 0x7f74a03b86a0] audio_convert: found function:
s16p to s16  (C)
[AVAudioResampleContext @ 0x7f74a03b86a0] audio_convert: found function:
s16p to s16  (SSE2)
[AVAudioResampleContext @ 0x7f74a03b86a0] audio_convert: found function:
s16p to s16  (AVX)
[mpeg4 @ 0x7f74a0392b20] detected 4 logical cores
[mpeg4 @ 0x7f74a045f6a0] 2. marker bit missing in 3. esc
[mpeg4 @ 0x7f74a045f6a0] Error at MB: 31
[mpeg4 @ 0x7f74a045f6a0] concealing 1125 DC, 1125 AC, 1125 MV errors

Minor issue (damaged frames):
-----------------------------
[avi @ 0x7fe410317580] Probed with size=2048 and score=100
st:1 removing common factor 384 from timebase
[avi @ 0x7fe410317580] All info found
[AVAudioResampleContext @ 0x7fe4103a8840] audio_convert: found function:
s16p to s16  (C)
[AVAudioResampleContext @ 0x7fe4103a8840] audio_convert: found function:
s16p to s16  (SSE2)
[AVAudioResampleContext @ 0x7fe4103a8840] audio_convert: found function:
s16p to s16  (AVX)
[mpeg4 @ 0x7fe410317b00] detected 4 logical cores
[mpeg4 @ 0x7fe4104567e0] ac-tex damaged at 6 0
[mpeg4 @ 0x7fe4104567e0] Error at MB: 6
[mpeg4 @ 0x7fe4104567e0] concealing 1125 DC, 1125 AC, 1125 MV errors
[mpeg4 @ 0x7fe410452480] ac-tex damaged at 6 1
[mpeg4 @ 0x7fe410452480] Error at MB: 52
[mpeg4 @ 0x7fe410452480] concealing 1125 DC, 1125 AC, 1125 MV errors

Major issue (no frames):
------------------------
[avi @ 0x7fb60433aca0] Probed with size=2048 and score=100
st:1 removing common factor 384 from timebase
[avi @ 0x7fb60433aca0] All info found
[AVAudioResampleContext @ 0x7fb6043c0700] audio_convert: found function:
s16p to s16  (C)
[AVAudioResampleContext @ 0x7fb6043c0700] audio_convert: found function:
s16p to s16  (SSE2)
[AVAudioResampleContext @ 0x7fb6043c0700] audio_convert: found function:
s16p to s16  (AVX)
[mpeg4 @ 0x7fb60433b220] detected 4 logical cores
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
[mpeg4 @ 0x7fb6044676c0] Context scratch buffers could not be allocated due
to unknown size.
...

I saved input packets passed to the decoder into a file for all these
cases. There were absolutely no differences between these files. (Note: All
packets had proper 8 byte zero padding in the end of the buffer.)

I found out that setting thread_count in codec context to 1 solves the
problem. But there are no problems with avplay using multiple threads.
There are also no problems with previous versions of Libav So is there
something I should know about thread locking?

I use Libav 10 from tarball and avcodec_decode_video2() for decoding.

Best regards,
Ondrej Perutka
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to