{"action":"created","issue":{"url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/154","labels_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/154/comments","events_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/154/events","html_url":"https://github.com/EricssonResearch/openwebrtc/issues/154","id":56178985,"number":154,"title":"source-1 (interaudiosrc) *sometimes* fixed to rate:48000","user":{"login":"ikonst","id":1186084,"avatar_url":"https://avatars.githubusercontent.com/u/1186084?v=3","gravatar_id":"","url":"https://api.github.com/users/ikonst","html_url":"https://github.com/ikonst","followers_url":"https://api.github.com/users/ikonst/followers","following_url":"https://api.github.com/users/ikonst/following{/other_user}","gists_url":"https://api.github.com/users/ikonst/gists{/gist_id}","starred_url":"https://api.github.com/users/ikonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikonst/subscriptions","organizations_url":"https://api.github.com/users/ikonst/orgs","repos_url":"https://api.github.com/users/ikonst/repos","events_url":"https://api.github.com/users/ikonst/events{/privacy}","received_events_url":"https://api.github.com/users/ikonst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-01T21:25:57Z","updated_at":"2015-02-02T22:22:11Z","closed_at":null,"body":"source-1 (interaudiosrc) is *sometimes* fixed to rate:48000.\r\n\r\nThe fixing is done in ...\r\n````c\r\nstatic GstCaps *\r\ngst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps)\r\n{\r\n  GstStructure *structure;\r\n\r\n  GST_DEBUG_OBJECT (src, \"fixate\");\r\n\r\n  caps = gst_caps_make_writable (caps);\r\n  caps = gst_caps_truncate (caps);\r\n\r\n  structure = gst_caps_get_structure (caps, 0);\r\n\r\n  gst_structure_fixate_field_string (structure, \"format\", GST_AUDIO_NE (S16));\r\n  gst_structure_fixate_field_nearest_int (structure, \"channels\", 2);\r\n  gst_structure_fixate_field_nearest_int (structure, \"rate\", 48000);\r\n  gst_structure_fixate_field_string (structure, \"layout\", \"interleaved\");\r\n\r\n  return caps;\r\n}\r\n````\r\n... and the rationale is unclear, but nevertheless the troubling thing is that the `caps` argument **randomly** (i.e. seemingly a race condition) is...\r\n\r\n * on \"good\" runs, has rate:8000 (I'm testing with PCMA)\r\n * on \"bad\" runs, has rate:1..2^32\r\n\r\nConsequentially:\r\n\r\n * on \"good\" runs, I'm no longer hitting resampling at all\r\n * on \"bad\" runs, source-1 is fixated to rate:48000 and I experience significantly higher CPU usage due to resampling"},"comment":{"url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/comments/72551128","html_url":"https://github.com/EricssonResearch/openwebrtc/issues/154#issuecomment-72551128","issue_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/154","id":72551128,"user":{"login":"ikonst","id":1186084,"avatar_url":"https://avatars.githubusercontent.com/u/1186084?v=3","gravatar_id":"","url":"https://api.github.com/users/ikonst","html_url":"https://github.com/ikonst","followers_url":"https://api.github.com/users/ikonst/followers","following_url":"https://api.github.com/users/ikonst/following{/other_user}","gists_url":"https://api.github.com/users/ikonst/gists{/gist_id}","starred_url":"https://api.github.com/users/ikonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikonst/subscriptions","organizations_url":"https://api.github.com/users/ikonst/orgs","repos_url":"https://api.github.com/users/ikonst/repos","events_url":"https://api.github.com/users/ikonst/events{/privacy}","received_events_url":"https://api.github.com/users/ikonst/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T22:22:11Z","updated_at":"2015-02-02T22:22:11Z","body":"PS. Isn't it weird that we have this race condition, regardless? Race conditions that cause the audio component to be (sometimes!) reconfigured for 48000 and afterwards 8000 doesn't sound like very healthy design."}}