After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797256 - flvmux: Don't refuse caps changes after starting to write headers in streamable mode.
flvmux: Don't refuse caps changes after starting to write headers in streamab...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-08 10:54 UTC by Yeongjin Jeong
Modified: 2018-10-21 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flvmux: Don't refuse caps changes after starting to write headers in streamable mode. (7.16 KB, patch)
2018-10-08 10:54 UTC, Yeongjin Jeong
committed Details | Review
tests: flvmux: Add test for caps change after starting to write headers (8.86 KB, patch)
2018-10-11 08:04 UTC, Yeongjin Jeong
committed Details | Review
tests: flvmux: Fix pushing invalid audio caps in tests (1.98 KB, patch)
2018-10-21 02:34 UTC, Yeongjin Jeong
committed Details | Review

Description Yeongjin Jeong 2018-10-08 10:54:02 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.
Comment 1 Olivier Crête 2018-10-10 14:49:02 UTC
It would be great to have a unit test with flvdemux to test that this doesn't regress.
Comment 2 Yeongjin Jeong 2018-10-11 07:59:53 UTC
(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.
Comment 3 Yeongjin Jeong 2018-10-11 08:04:39 UTC
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.
Comment 4 Olivier Crête 2018-10-11 19:38:33 UTC
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
Comment 5 Tim-Philipp Müller 2018-10-20 11:42:37 UTC
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
Comment 6 Yeongjin Jeong 2018-10-21 02:05:51 UTC
(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)
Comment 7 Yeongjin Jeong 2018-10-21 02:34:11 UTC
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
Comment 8 Olivier Crête 2018-10-21 06:46:57 UTC
Thank you, merged too

Attachment 373981 [details] pushed as 3011426 - tests: flvmux: Fix pushing invalid audio caps in tests
Comment 9 Tim-Philipp Müller 2018-10-21 16:43:40 UTC
Thanks for the quick fix!