GNOME Bugzilla – Bug 797256
flvmux: Don't refuse caps changes after starting to write headers in streamable mode.
Last modified: 2018-10-21 16:43:40 UTC
Created attachment 373869 [details] [review] flvmux: Don't refuse caps changes after starting to write headers in streamable mode. Flv does support changing the stream type and stream properties after the headers were started to be written, and for example H264 codec_data changes can be supported.
It would be great to have a unit test with flvdemux to test that this doesn't regress.
(In reply to Olivier Crête from comment #1) > It would be great to have a unit test with flvdemux to test that this > doesn't regress. Thanks for review, I've been created unit test and will be upload it.
Created attachment 373894 [details] [review] tests: flvmux: Add test for caps change after starting to write headers Add test case to verify caps change after starting to write headers.
Thank you, I merged your patches. Attachment 373869 [details] pushed as 8cae95a - flvmux: Don't refuse caps changes after starting to write headers in streamable mode. Attachment 373894 [details] pushed as 7b5f724 - tests: flvmux: Add test for caps change after starting to write headers
This new test appears to be failing - does it pass for you guys? │ FAIL: elements/flvmux │ ===================== │ │ Running suite(s): flvmux │ 95%: Checks: 21, Failures: 1, Errors: 0 │ elements/flvmux.c:725:F:general:test_audio_caps_change_streamable:0: Assertion 'gst_caps_is_equal (a_caps1, ret_caps)' failed
(In reply to Tim-Philipp Müller from comment #5) > This new test appears to be failing - does it pass for you guys? > > │ FAIL: elements/flvmux > │ ===================== > │ > │ Running suite(s): flvmux > │ 95%: Checks: 21, Failures: 1, Errors: 0 > │ elements/flvmux.c:725:F:general:test_audio_caps_change_streamable:0: > Assertion 'gst_caps_is_equal (a_caps1, ret_caps)' failed Sorry, I was pushing invalid aac codec data. At the time of this patch, there was a bug in flvdemux that was not aware of the problem. (https://bugzilla.gnome.org/show_bug.cgi?id=797256)
Created attachment 373981 [details] [review] tests: flvmux: Fix pushing invalid audio caps in tests Previous commit created caps with incorrect aac codec data that did not match the audio channel. The new aac codec data used in this test was created using gst-launch as follows: gst-launch-1.0 audiotestsrc num-buffers=1 ! audio/x-raw, rate=44100, channels=1 ! fdkaacenc ! aacparse ! fakesink gst-launch-1.0 audiotestsrc num-buffers=1 ! audio/x-raw, rate=22050, channels=1 ! fdkaacenc ! aacparse ! fakesink
Thank you, merged too Attachment 373981 [details] pushed as 3011426 - tests: flvmux: Fix pushing invalid audio caps in tests
Thanks for the quick fix!