Opened 5 years ago

Closed 5 years ago

#2353 closed defect (wontfix)

"Got unexpected packet after EOF"

Reported by: Rhialto Owned by: beastd
Priority: normal Component: undetermined
Version: 1.3 Severity: normal
Keywords: Cc: mail@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: yes

Description

Summary of the bug:

For many video and audio files that are somewhat (some years or so) older, I get many messages of the form

A:   1.5 V:   1.5 A-V:  0.050 ct: -0.043  36/ 36 125%  3%  4.0% 16 6 
[mp3float @ 0x7cafc6874980]Got unexpected packet after EOF

This occurs for instance (but not exclusively with) MPEG-2 broadcasts that were captured.

The annoying effect is that the audio stutters.

The messages can be suppressed with "msglevel=decaudio=0". This reduces the stuttering, but often it doesn't really go away.

I an very certain that the version of mplayer of when the files were new did not have this problem. Other playes also don't show this problem.

How to reproduce: with this broadcast capture from 2005:

$ mplayer -v 161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg
MPlayer 1.3.0-5.5.0 (C) 2000-2016 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 13
CPU: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz (Family: 6, Model: 42, Stepping: 7)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1 SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/xxx/.mplayer/codecs.conf'
Reading optional codecs config file /home/xxx/.mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /usr/pkg/share/mplayer/codecs.conf: 224 audio & 451 video codecs
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/xxx/.mplayer/fonts'
Configuration: --prefix=/usr/pkg --disable-smb --disable-ffmpeg_a --yasm= --disable-aa --disable-caca --enable-cdparanoia --disable-libdca --enable-libdv --enable-dvdnav --disable-esd --disable-faac --enable-faad --disable-ggi --enable-gif --enable-jpeg --disable-mp3lame --enable-mad --disable-mlib --enable-menu --enable-runtime-cpudetection --disable-win32dll --enable-nas --enable-ossaudio --enable-png --disable-pulse --enable-sdl --enable-theora --disable-vidix --enable-x264 --enable-xvid --enable-vdpau --disable-lirc --extra-libs=-lx264 -lxvidcore --disable-mencoder --confdir=/usr/pkg/share/mplayer --enable-xvmc --with-xvmclib=XvMCW
CommandLine: '-v' '161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg'
Using nanosleep() timing
get_path('input.conf') -> '/home/xxx/.mplayer/input.conf'
Parsing input config file /home/xxx/.mplayer/input.conf
Input config file /home/xxx/.mplayer/input.conf parsed: 6 binds
get_path('161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg.conf') -> '/home/xxx/.mplayer/161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg.conf'

Playing 161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg.
get_path('sub/') -> '/home/xxx/.mplayer/sub/'
[file] File size is 1535055872 bytes
STREAM: [file] 161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 57.83.100 (external)
Configuration: --enable-avfilter --enable-avresample --enable-postproc --enable-rpath --disable-ffplay --enable-fontconfig --enable-libfreetype --enable-libass --disable-htmlpages --enable-libfdk_aac --enable-nonfree --enable-gnutls --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-openssl --disable-libtesseract --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-libx265 --enable-vdpau --enable-vaapi --enable-libvpx --disable-libxcb --enable-libbluray --arch=x86_64 --cc=gcc --disable-debug --disable-optimizations --disable-stripping --enable-gpl --enable-libxml2 --enable-pthreads --enable-shared --mandir=/usr/pkg/man --prefix=/usr/pkg --progs-suffix=3 --datadir=/usr/pkg/share/ffmpeg3 --docdir=/usr/pkg/share/doc/ffmpeg3 --incdir=/usr/pkg/include/ffmpeg3 --libdir=/usr/pkg/lib/ffmpeg3 --shlibdir=/usr/pkg/lib/ffmpeg3 --enable-runtime-cpudetect
LAVF_check: MPEG-PS (MPEG-2 Program Stream)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename 161 - Doctor Who - ROSE - DVD (MPEG2) quality.mpg ext: .mpg
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 0
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 70224, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1140851704
LMLM4 Stream Format not found
system stream synced at 0xD (13)!
==> Found video stream: 0
==> Found audio stream: 0
MPEG-PS file format detected.
ds_fill_buffer: EOF reached (stream: audio)  
MPEG: No audio stream found -> no sound.
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  5102.4 kbps (637.8 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.000  ftime:=0.0400
Could not find a UTF-8 locale,
character keys beyond Latin-1 will not be handled.
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1920x1200 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
Failed to open VDPAU backend Shared object "libvdpau_r600.so" not found
[vdpau] Error when calling vdp_device_create_x11: 1
[VO_XV] Using Xv Adapter #0 (Radeon Textured Video)
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 16384x16384
Opening video filter: [pp]
[vo] query(Planar YV12) -> 3
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=0, chromMode=0
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=2, chromMode=0
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=3, chromMode=0
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=3, chromMode=2
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=3, chromMode=3
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=7, chromMode=3
pp: de
pp: de::de
pp: hb::hb
pp: option: a
pp: vb::vb
pp: option: a
pp: dr::dr
pp: option: a
pp: lumMode=7, chromMode=7
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.107.100 (external)
Configuration: --enable-avfilter --enable-avresample --enable-postproc --enable-rpath --disable-ffplay --enable-fontconfig --enable-libfreetype --enable-libass --disable-htmlpages --enable-libfdk_aac --enable-nonfree --enable-gnutls --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-openssl --disable-libtesseract --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-libx265 --enable-vdpau --enable-vaapi --enable-libvpx --disable-libxcb --enable-libbluray --arch=x86_64 --cc=gcc --disable-debug --disable-optimizations --disable-stripping --enable-gpl --enable-libxml2 --enable-pthreads --enable-shared --mandir=/usr/pkg/man --prefix=/usr/pkg --progs-suffix=3 --datadir=/usr/pkg/share/ffmpeg3 --docdir=/usr/pkg/share/doc/ffmpeg3 --incdir=/usr/pkg/include/ffmpeg3 --libdir=/usr/pkg/lib/ffmpeg3 --shlibdir=/usr/pkg/lib/ffmpeg3 --enable-runtime-cpudetect
INFO: libavcodec init OK!
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
[PP] Using external postprocessing filter, max q = 6.
AutoQ: setting quality to 6.
Load subtitles in ./
get_path('sub/') -> '/home/xxx/.mplayer/sub/'
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "mp2float" init OK!
AUDIO: 48000 Hz, 2 ch, floatle, 256.0 kbit/8.33% (ratio: 32000->384000)
Selected audio codec: [ffmp2float] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio)
==========================================================================
Building audio filter chain for 48000Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy 
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[dummy] Was reinitialized: 48000Hz/2ch/floatle
Trying preferred audio driver 'oss', options '[none]'
ao2: 48000 Hz  2 chans  floatle
audio_setup: using '/dev/sound' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
OSS: Unknown/not supported internal format: floatle
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 2 channels (requested: 2)
audio_setup: using 48000 Hz samplerate (requested: 48000)
audio_setup: frags:   7/8  (8192 bytes/frag)  free:  57344
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 48000Hz/2ch/floatle -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[libaf] Adding filter format 
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
Starting playback...
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[libaf] Reallocating memory in module format, old len = 0, new len = 59401
Increasing filtered audio buffer size from 0 to 59392
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation and IDCT)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: pp vo
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: pp vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x576->720x576,flags=4,'MPlayer',0x32315659)
REQ: flags=0x437  req=0x0  
VO: [xv] 720x576 => 720x576 Planar YV12  [zoom]
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
Xvideo image format: 0x59565955 (UYVY) packed
using Xvideo port 63 for hw scaling
*** [pp] Allocating mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
*** [pp] Allocating mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
[ffmpeg] aspect_ratio: 1.777778
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: pp vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (720x576->1024x576,flags=4,'MPlayer',0x32315659)
REQ: flags=0x437  req=0x0  
VO: [xv] 720x576 => 1024x576 Planar YV12  [zoom]
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
Xvideo image format: 0x59565955 (UYVY) packed
using Xvideo port 63 for hw scaling
*** [vo] Allocating mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
[postproc @ 0x7b1a9f216040]using npp filters 0x7/0x7
Unicode font: 5369 glyphs.
Unicode font: 5369 glyphs.
A:   1.0 V:   0.8 A-V:  0.277 ct:  0.000   2/  2 ??% ??% ??,?% 2 6 
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
*** [pp] Allocating mp_image_t, 768x576x12bpp YUV planar, 663552 bytes
[postproc @ 0x7b1a9f216040]using npp filters 0x7/0x7
A:   1.1 V:   0.8 A-V:  0.280 ct:  0.000   3/  3 ??% ??% ??,?% 3 6 
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[postproc @ 0x7b1a9f216040]using npp filters 0x7/0x3
A:   1.1 V:   0.9 A-V:  0.240 ct:  0.000   4/  4 ??% ??% ??,?% 4 5 
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x3
A:   1.1 V:   0.9 A-V:  0.200 ct:  0.000   5/  5 ??% ??% ??,?% 4 4 
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x2
A:   1.1 V:   0.9 A-V:  0.160 ct:  0.000   6/  6 ??% ??% ??,?% 5 3 
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x0
A:   1.1 V:   1.0 A-V:  0.120 ct:  0.000   7/  7 ??% ??% ??,?% 6 2 
[postproc @ 0x7b1a9f216040]using npp filters 0x2/0x0
A:   1.1 V:   1.0 A-V:  0.080 ct:  0.000   8/  8 ??% ??% ??,?% 6 1 
[postproc @ 0x7b1a9f216040]using npp filters 0x0/0x0
A:   1.1 V:   1.1 A-V:  0.040 ct:  0.000   9/  9 ??% ??% ??,?% 6 0 
[postproc @ 0x7b1a9f216040]using npp filters 0x0/0x0
A:   1.1 V:   1.1 A-V:  0.000 ct:  0.000  10/ 10 ??% ??% ??,?% 6 0 
[postproc @ 0x7b1a9f216040]using npp filters 0x0/0x0
A:   1.1 V:   1.1 A-V:  0.003 ct: -0.000  11/ 11 ??% ??% ??,?% 6 0 
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[postproc @ 0x7b1a9f216040]using npp filters 0x2/0x0
A:   1.2 V:   1.2 A-V:  0.005 ct: -0.000  12/ 12 ??% ??% ??,?% 6 1 
[postproc @ 0x7b1a9f216040]using npp filters 0x2/0x0
A:   1.2 V:   1.2 A-V:  0.008 ct: -0.001  13/ 13 ??% ??% ??,?% 6 1 
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x0
A:   1.3 V:   1.2 A-V:  0.091 ct:  0.003  14/ 14 165% 12%  9.8% 6 2 
[mp2float @ 0x7b1aa0474980]Got unexpected packet after EOF
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x2
A:   1.3 V:   1.2 A-V:  0.093 ct:  0.007  15/ 15 153% 11%  9.6% 6 3 
[postproc @ 0x7b1a9f216040]using npp filters 0x3/0x3
A:   1.3 V:   1.3 A-V:  0.096 ct:  0.011  16/ 16 143% 11%  9.3% 6 4 

...

Change History (13)

comment:1 by beastd, 5 years ago

Status: newopen

I couldn't reproduce yet, but the problem looks related to the restructuring of the FFmpeg decoding code (FFmpeg commit 061a0c14b).

Seems MPlayer indirectly uses the new code in a way that it wasn't designed for. In FFmpeg there was a change to somehow mitigate those cases (FFmpeg commit 02ba4b91b). I suspect it's not perfect.

Maybe you can try using a non-FFmpeg audio decoder (see mplayer -ac option) to see if the problem persists.

Also please try using latest MPlayer development version, to see if that makes a difference.

comment:2 by Rhialto, 5 years ago

It looks like you're right!

Normally I use pkgsrc to build stuff (see http://pkgsrc.se/multimedia/mplayer). It does dependency management and has its own idea about which options it makes available to the user and what arguments it gives to configure.

So now I checked out the svn source and built that with no additional configure options. That built a new mplayer without issue (which is great! much better than with many other packages, which don't manage to do that on NetBSD without some extra help). It did include libmpg123 this time (pkgsrc doesn't include that; I plan to fix that).

So by default mplayer uses libmpg123 for playing this audio, and this did not show the issue. (This is a reason to fix pkgsrc to use libmpg123).

I also tried with "-afm ffmpeg" and there was no problem there either. It seemed indeed to force mplayer to use the ffmpeg based decoder. So all is good!

==========================================================================
Trying to force audio codec driver family ffmpeg...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 224.0 kbit/7.94% (ratio: 28000->352800)
Selected audio codec: [ffmp2float] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio)
==========================================================================

Note that pkgsrc doesn't like software that includes copies of other libraries. The pkgsrc build seems to ignore the ffmpeg that comes with mplayer, and instead uses one it installs system-wide. Currently it uses ffmpeg3 for that. It may make a difference for the mitigation you mention. I haven't looked into that yet.

comment:3 by Rhialto, 5 years ago

Oh, a thing I noticed while working on this: if you call configure --enable-mpg123, then the configure script forgets to do extra_ldflags="$extra_ldflags -lmpg123". It only does that as long as _mpg123 is auto.

There are more options with code that is structured similarly, such as the next one. But some others are better structured, such as that for --enable-libopus.

in reply to:  3 comment:4 by beastd, 5 years ago

Replying to rhialto:

Oh, a thing I noticed while working on this: if you call configure --enable-mpg123, then the configure script forgets to do extra_ldflags="$extra_ldflags -lmpg123". It only does that as long as _mpg123 is auto.

There are more options with code that is structured similarly, such as the next one. But some others are better structured, such as that for --enable-libopus.

Yes, there is some inconsistency revolving around that.

IIRC the argument for the first type (like --enable-mpg123) is, that you only need to use --enable-* if really want to force the compilation of that particular feature. So if you really want to do that, you are supposed to correctly specify all the flags of your own too. The problem with the second type (like --enable-libopus) is, you can't override the libs added configure with your own.

Anyway resolving that inconsistency is rather off-topic for this ticket and would at least require a new ticket and a discussion of its own.

Only to be sure, in the end you didn't need to specify --enable-mpg123, but could just the auto-detection which is enabled by default, right?

in reply to:  2 comment:5 by beastd, 5 years ago

Replying to rhialto:
[...]

So by default mplayer uses libmpg123 for playing this audio, and this did not show the issue. (This is a reason to fix pkgsrc to use libmpg123).

I also tried with "-afm ffmpeg" and there was no problem there either. It seemed indeed to force mplayer to use the ffmpeg based decoder. So all is good!

==========================================================================
Trying to force audio codec driver family ffmpeg...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 224.0 kbit/7.94% (ratio: 28000->352800)
Selected audio codec: [ffmp2float] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio)
==========================================================================

I am failing to see how the problem was fixed, but I faintly remember that we changed something after issues with IIRC AC3 decoding came up. Not sure though...

Could you maybe be bothered to build the old version you had before and compare decoding audio with mpg123 vs ffmpeg and see if your original issues can be reproduced? If you don't have the time or it's not straight forward to do, please don't do it. We should really make a new release anyway.

Note that pkgsrc doesn't like software that includes copies of other libraries. The pkgsrc build seems to ignore the ffmpeg that comes with mplayer, and instead uses one it installs system-wide. Currently it uses ffmpeg3 for that. It may make a difference for the mitigation you mention. I haven't looked into that yet.

Using externally compiled FFmpeg should be fine, but yes there could be different results because of that. Did you use internally compiled FFmpeg in your previous tests?

comment:6 by Rhialto, 5 years ago

The configure options are not such a big problem, in the end I indeed simply left out --enable-mpg123. Indeed, for package building it is nice if you can force some library to be used and get an error if the library can't be used. That would typically point to some build environment inconsistency, since the packaging framework would be responsible for coordinating this. So I only worry about it when I put my packager's hat on.

The old version (the version that I was using when I was reporting the problem) didn't support for libmpg123 built in (and used external ffmpeg). So it always fell back to the ffmpeg library for the audio. And now that you mention AC3, I have indeed seen the same kind of messages from files that AC3 audio. Since I don't seem to have another decoder for that I haven't tried to change that. But somehow there was less to no stuttering there despite the frequent messages.

So I think for now most of my problems are resolved. If you had a specific patch that fixes the issue from the mplayer side, that would be nice to have (so I could apply it in the packaging), but since you don't recall how you fixed it, never mind.

And the remaining messages with AC3 would disappear with a release, I expect. They don't occur either in the fresh svn build I made (I can assume that the built-in ffmpeg versus external ffmpeg won't be a problem).

Thanks!

in reply to:  6 ; comment:7 by beastd, 5 years ago

Resolution: worksforme
Status: openclosed

Replying to rhialto:

The configure options are not such a big problem, in the end I indeed simply left out --enable-mpg123. Indeed, for package building it is nice if you can force some library to be used and get an error if the library can't be used. That would typically point to some build environment inconsistency, since the packaging framework would be responsible for coordinating this. So I only worry about it when I put my packager's hat on.

I see. One could achieve a similar effect by using -vo help etc. and query the created binary. But that's probably not a good idea at all, because it's more work to carefully implement and wouldn't work for cross-compiling!

The old version (the version that I was using when I was reporting the problem) didn't support for libmpg123 built in (and used external ffmpeg). So it always fell back to the ffmpeg library for the audio. And now that you mention AC3, I have indeed seen the same kind of messages from files that AC3 audio. Since I don't seem to have another decoder for that I haven't tried to change that. But somehow there was less to no stuttering there despite the frequent messages.

So I think for now most of my problems are resolved. If you had a specific patch that fixes the issue from the mplayer side, that would be nice to have (so I could apply it in the packaging), but since you don't recall how you fixed it, never mind.

Sadly after checking multiple times I couldn't find it, which likely means it isn't there :( Maybe there were some changes in FFmpeg that improved things for MPlayer.

And the remaining messages with AC3 would disappear with a release, I expect. They don't occur either in the fresh svn build I made (I can assume that the built-in ffmpeg versus external ffmpeg won't be a problem).

I am closing this for now. If you can reproduce with current MPlayer (SVN) or the next release, feel free to re-open this ticket.

comment:8 by beastd, 5 years ago

Analyzed by developer: set

in reply to:  7 ; comment:9 by beastd, 5 years ago

Resolution: worksforme
Status: closedreopened

Replying to beastd:

Replying to rhialto:

So I think for now most of my problems are resolved. If you had a specific patch that fixes the issue from the mplayer side, that would be nice to have (so I could apply it in the packaging), but since you don't recall how you fixed it, never mind.

Sadly after checking multiple times I couldn't find it, which likely means it isn't there :( Maybe there were some changes in FFmpeg that improved things for MPlayer.

While I wasn't looking for it at all, I found something.

Maybe r37946 could do the trick:

--- trunk/libmpcodecs/ad_ffmpeg.c	Fri Jun 30 23:29:33 2017	(r37945)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Mon Jul  3 22:00:43 2017	(r37946)
@@ -332,6 +332,11 @@ static int decode_audio(sh_audio_t *sh_a
 	    int in_size = x;
 	    int consumed = ds_parse(sh_audio->ds, &start, &x, pts, 0);
 	    sh_audio->ds->buffer_pos -= in_size - consumed;
+	    // Note: hopefully below is correct, it was only
+	    // added because FFmpeg broke the API and 0-sized
+	    // packets started to break e.g. AC3 decode.
+	    if (x <= 0)
+	        break; // error or not enough data
 	}
 
 	av_init_packet(&pkt);

[...]

comment:10 by Rhialto, 5 years ago

Thanks! I will try that out in the near future.

in reply to:  9 ; comment:11 by maciejsszmigiero, 5 years ago

Cc: mail@… added

Replying to beastd:

Replying to beastd:

Replying to rhialto:

So I think for now most of my problems are resolved. If you had a specific patch that fixes the issue from the mplayer side, that would be nice to have (so I could apply it in the packaging), but since you don't recall how you fixed it, never mind.

Sadly after checking multiple times I couldn't find it, which likely means it isn't there :( Maybe there were some changes in FFmpeg that improved things for MPlayer.

While I wasn't looking for it at all, I found something.

Maybe r37946 could do the trick:

(..)

FYI: I've had the same issue as OP with AC3 streams and can confirm that the patch
referenced above fixed it for me.

comment:12 by Rhialto, 5 years ago

Yes, it also fixes it for me. Thanks! I just recently tried. Then I noticed that there is a new mplayer release, so I think I'll package that into pkgsrc, instead of just this patch.

in reply to:  11 comment:13 by beastd, 5 years ago

Resolution: wontfix
Status: reopenedclosed

Replying to maciejsszmigiero:

Replying to beastd:
[...]

While I wasn't looking for it at all, I found something.

Maybe r37946 could do the trick:

(..)

FYI: I've had the same issue as OP with AC3 streams and can confirm that the patch
referenced above fixed it for me.

Replying to rhialto:

Yes, it also fixes it for me. Thanks! I just recently tried. Then I noticed that there is a new mplayer release, so I think I'll package that into pkgsrc, instead of just this patch.

Thank you both for the feedback!

Closing as "Won't fix" because we are not planning to add a new point release to 1.3 . Hope that is OK for you.

Please use 1.4 or current development version (SVN).

Note: See TracTickets for help on using tickets.