This fixes missing mp3 channel data in the FFmpeg demuxer.
-- v4: winedmo: Call avformat_find_stream_info for the mp3 format.
From: Brendan McGrath bmcgrath@codeweavers.com
Required to obtain the number of channels. --- dlls/winedmo/unix_demuxer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winedmo/unix_demuxer.c b/dlls/winedmo/unix_demuxer.c index 15d906e0c5f..236d66d765a 100644 --- a/dlls/winedmo/unix_demuxer.c +++ b/dlls/winedmo/unix_demuxer.c @@ -154,14 +154,16 @@ NTSTATUS demuxer_create( void *arg ) } format = demuxer->ctx->iformat;
- if ((params->duration = get_context_duration( demuxer->ctx )) == AV_NOPTS_VALUE) + if ((params->duration = get_context_duration( demuxer->ctx )) == AV_NOPTS_VALUE || + strstr( format->name, "mp3" )) { if ((ret = avformat_find_stream_info( demuxer->ctx, NULL )) < 0) { ERR( "Failed to find stream info, error %s.\n", debugstr_averr(ret) ); goto failed; } - params->duration = get_context_duration( demuxer->ctx ); + if (params->duration == AV_NOPTS_VALUE) + params->duration = get_context_duration( demuxer->ctx ); } if (!(demuxer->streams = calloc( demuxer->ctx->nb_streams, sizeof(*demuxer->streams) ))) goto failed; if (demuxer_create_streams( demuxer )) goto failed;
On Mon Mar 3 09:37:02 2025 +0000, Brendan McGrath wrote:
@rbernon I wasn't sure how harmless/harmful this assignment was, so I added a check just in case. If you think it's unnecessary I'll remove.
It's probably harmless, you can keep it like it was.