From: Akihiro Sagawa sagawa.aki@gmail.com
The mpegaudioparse element will not send a duration-changed message if no Xing or VBRI headers are present.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v3: Make the commit message a bit more accurate.
dlls/quartz/tests/mpegsplit.c | 8 ++++---- dlls/quartz/tests/rsrc.rc | 2 +- dlls/quartz/tests/test.mp3 | Bin 2349 -> 2157 bytes dlls/winegstreamer/gstdemux.c | 13 ++++++++++--- 4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c index 9bfd7e3bb19..e407fe44eeb 100644 --- a/dlls/quartz/tests/mpegsplit.c +++ b/dlls/quartz/tests/mpegsplit.c @@ -523,13 +523,13 @@ static void test_media_types(void) { MPEG1WAVEFORMAT expect_wfx = { - {WAVE_FORMAT_MPEG, 1, 48000, 8000, 192, 0, sizeof(MPEG1WAVEFORMAT) - sizeof(WAVEFORMATEX)}, - ACM_MPEG_LAYER3, 64000, ACM_MPEG_SINGLECHANNEL, 0, 1, ACM_MPEG_PROTECTIONBIT | ACM_MPEG_ID_MPEG1, 0, 0 + {WAVE_FORMAT_MPEG, 1, 48000, 4000, 96, 0, sizeof(MPEG1WAVEFORMAT) - sizeof(WAVEFORMATEX)}, + ACM_MPEG_LAYER3, 32000, ACM_MPEG_SINGLECHANNEL, 4096, 1, ACM_MPEG_ORIGINALHOME | ACM_MPEG_PROTECTIONBIT | ACM_MPEG_ID_MPEG1, 0, 0 }; static const MPEGLAYER3WAVEFORMAT expect_mp3_wfx = { - {WAVE_FORMAT_MPEGLAYER3, 1, 48000, 8000, 1, 0, sizeof(MPEGLAYER3WAVEFORMAT) - sizeof(WAVEFORMATEX)}, - MPEGLAYER3_ID_MPEG, 0, 192, 1, 0 + {WAVE_FORMAT_MPEGLAYER3, 1, 48000, 4000, 1, 0, sizeof(MPEGLAYER3WAVEFORMAT) - sizeof(WAVEFORMATEX)}, + MPEGLAYER3_ID_MPEG, 0, 96, 1, 0 };
const WCHAR *filename = load_resource(L"test.mp3"); diff --git a/dlls/quartz/tests/rsrc.rc b/dlls/quartz/tests/rsrc.rc index 753415cf8de..d28c2bd6edc 100644 --- a/dlls/quartz/tests/rsrc.rc +++ b/dlls/quartz/tests/rsrc.rc @@ -28,7 +28,7 @@ test.avi RCDATA "test.avi" /* @makedep: test.mpg */ test.mpg RCDATA "test.mpg"
-/* ffmpeg -f lavfi -i "sine=frequency=500" -t 0.5 -ar 48000 -b:a 32k -f mp3 -acodec mp3 test.mp3 */ +/* ffmpeg -f lavfi -i "sine=frequency=500" -t 0.5 -ar 48000 -b:a 32k -f mp3 -acodec mp3 -write_xing 0 test.mp3 */ /* @makedep: test.mp3 */ test.mp3 RCDATA "test.mp3"
diff --git a/dlls/quartz/tests/test.mp3 b/dlls/quartz/tests/test.mp3 index 78d8dd2af62027147a3f169a8306b601ab37c3b6..b35e6b77d1315fa5b742085226ecd0cefbdf4896 100644 GIT binary patch literal 2157 zcmbuAeN+=?7RKLX5(p&H2n1OJb`rG$i5L}K^lZ07AQ&;x5DB4_j|8k%v<H?(#iW5r z11(jlcm!8bF<AKug&<1HN0orkMRvQoDux0Uad8cTpe~_^eC$l(viraD$IN@qJ?D4c zd!OgIvo&lz3E<E2sGU0n*!LX(Ad&Lm?hV0#>ox_h<?-xQ$7}wzXFC8S5<?!PM0qE3 zD{gF*06?hTgaG2Mn|(yA#(meh_1_OsnBtk<`rBi-w5$oTnY3<M%;}fyt$B;Ccd_c} zz4y}%^ZFUG+m!038R51z#L{(sPib{{GQjx|AZ5H8;QJ8x9fo#YWrm4v|AD7-O?Hk7 z;>}S{I>S@~kh+J#G#{|FeLOZbE!gc}7xU-@L&Fv>ME>bT1MSr!uas`vwAOEA!g^(J zNxAO0##$RBU-o7GGMw*>LNiPnwQm=q*C#0tf6{r0x!3pad-|uXvS$&QGv<pPEPzO= z0v1a<y*<k+!d*v4#gvanEVj5N+2sxWR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eN5^i2mj28)Y-(m7O0Nr^$TX{J0LbE-toCE1&cC zy+D7g_?D7s*h8HEr?Q@rZ=f3QEBTZ4(EkOlg^S#;H{w8?^Em4Qi}WY!-*@Ui<!$R8
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index e7d8a0b98c6..b9c91245f82 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -79,7 +79,7 @@ struct gstdemux_source GstPad *their_src, *post_sink, *post_src, *my_sink; GstElement *flip; AM_MEDIA_TYPE mt; - HANDLE caps_event; + HANDLE caps_event, eos_event; GstSegment *segment; SourceSeeking seek; }; @@ -699,6 +699,8 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event) case GST_EVENT_EOS: if (pin->pin.pin.peer) IPin_EndOfStream(pin->pin.pin.peer); + else + SetEvent(pin->eos_event); return TRUE; case GST_EVENT_FLUSH_START: if (impl_from_strmbase_filter(pin->pin.pin.filter)->ignore_flush) { @@ -2129,6 +2131,7 @@ static void free_source_pin(struct gstdemux_source *pin) } gst_object_unref(pin->my_sink); CloseHandle(pin->caps_event); + CloseHandle(pin->eos_event); FreeMediaType(&pin->mt); gst_segment_free(pin->segment);
@@ -2161,6 +2164,7 @@ static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *
strmbase_source_init(&pin->pin, &filter->filter, name, &source_ops); pin->caps_event = CreateEventW(NULL, FALSE, FALSE, NULL); + pin->eos_event = CreateEventW(NULL, FALSE, FALSE, NULL); pin->segment = gst_segment_new(); gst_segment_init(pin->segment, GST_FORMAT_TIME); pin->IQualityControl_iface.lpVtbl = &GSTOutPin_QualityControl_Vtbl; @@ -2561,7 +2565,8 @@ static BOOL mpeg_splitter_init_gst(struct gstdemux *filter) static const WCHAR source_name[] = {'A','u','d','i','o',0}; struct gstdemux_source *pin; GstElement *element; - HANDLE events[2]; + HANDLE events[3]; + DWORD res; int ret;
if (!(element = gst_element_factory_make("mpegaudioparse", NULL))) @@ -2600,7 +2605,9 @@ static BOOL mpeg_splitter_init_gst(struct gstdemux *filter)
events[0] = filter->duration_event; events[1] = filter->error_event; - if (WaitForMultipleObjects(2, events, FALSE, INFINITE)) + events[2] = pin->eos_event; + res = WaitForMultipleObjects(3, events, FALSE, INFINITE); + if (res == 1) return FALSE;
pin->seek.llDuration = pin->seek.llStop = query_duration(pin->their_src);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=73348
Your paranoid android.
=== w8 (32 bit report) ===
quartz: videorenderer.c:1085: Test failed: Thread should block in Receive().