{"id":1804,"date":"2017-08-13T10:32:49","date_gmt":"2017-08-13T08:32:49","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1804"},"modified":"2017-08-13T10:32:49","modified_gmt":"2017-08-13T08:32:49","slug":"microsoft-aac-encoders-mf_e_transform_need_more_input-after-mft_output_status_sample_ready","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1804","title":{"rendered":"Microsoft AAC Encoder&#8217;s MF_E_TRANSFORM_NEED_MORE_INPUT after MFT_OUTPUT_STATUS_SAMPLE_READY"},"content":{"rendered":"<p>Media Foundation <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/dd742785\">AAC Encoder<\/a> is a pure MFT, as opposed to legacy DSP&#8217;s which are made dual DMO\/MFT interfaced and presumably have higher chances for smaller artifacts.<\/p>\n<p>The transform is synchronous and is supposed to be simpler inside: fully passive and drives by input\/output calls.<\/p>\n<p>Nevertheles, advertising <code>MFT_OUTPUT_STATUS_SAMPLE_READY<\/code> via <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms696269\"><code>IMFTransform::GetOutputStatus<\/code><\/a> call, if might falsely indicate availability of data. Subsequent <code>ProcessOutput<\/code> call returns <code>MF_E_TRANSFORM_NEED_MORE_INPUT<\/code>&#8230; Documented behavior:<\/p>\n<blockquote><p>If the method returns the <code>MFT_OUTPUT_STATUS_SAMPLE_READY<\/code> flag, it means you can generate one or more output samples by calling <code>IMFTransform::ProcessOutput<\/code>.<\/p>\n<p>MFTs are not required to implement this method. If the method returns <code>E_NOTIMPL<\/code>, you must call <code>ProcessOutput<\/code> to determine whether the transform has output data.<\/p><\/blockquote>\n<p>The method is optional, but it is implemented on this particular MFT. Also, this MFT is one of the stock transforms that are documented for public use. Microsoft could apparently have done a better job implementing it cleanly.<\/p>\n<p>See also:<\/p>\n<ul>\n<li><a class=\"question-hyperlink\" href=\"https:\/\/stackoverflow.com\/questions\/42343060\/getoutputstatus-says-output-is-ready-processoutput-says-need-more-input\">GetOutputStatus says output is ready, ProcessOutput says NEED_MORE_INPUT<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Media Foundation AAC Encoder is a pure MFT, as opposed to legacy DSP&#8217;s which are made dual DMO\/MFT interfaced and presumably have higher chances for smaller artifacts. The transform is synchronous and is supposed to be simpler inside: fully passive and drives by input\/output calls. Nevertheles, advertising MFT_OUTPUT_STATUS_SAMPLE_READY via IMFTransform::GetOutputStatus call, if might falsely indicate&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1804\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[63,424,70],"class_list":["post-1804","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-bug","tag-media-foundation","tag-winapi"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1804"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1804\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}