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 78d8dd2af62..b35e6b77d13 100644 Binary files a/dlls/quartz/tests/test.mp3 and b/dlls/quartz/tests/test.mp3 differ 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);