[PATCH v4 0/1] MR7439: winedmo: Find mp3 stream info if channel data is missing.
This fixes missing mp3 channel data in the FFmpeg demuxer. -- v4: winedmo: Call avformat_find_stream_info for the mp3 format. https://gitlab.winehq.org/wine/wine/-/merge_requests/7439
From: Brendan McGrath <bmcgrath(a)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; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7439
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.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7439#note_96519
participants (3)
-
Brendan McGrath -
Brendan McGrath (@redmcg) -
Rémi Bernon