On Mon, Sep 24, 2012 at 5:02 PM, Justin Ruggles
<[email protected]> wrote:
> On 09/24/2012 05:56 PM, Nathan Caldwell wrote:
> [...]
>> +    /* FIXME: When DTX is enabled, opus_multistream_encode will return 1 if
>> +     * a packet does not need to be transmitted.
>> +     */
>
> If the encoder only uses 1 frame-per-packet, a 0-size frame payload will
> result in a 1-byte packet for the TOC. Does libopus actually write that
> TOC byte to the output packet? If so, I don't think there is any need
> for a FIXME. If not, we could probably just reuse the TOC from the last
> packet.
>
> Also, can it return > 1 if it's using multiple frames-per-packet? And if
> so, does it also write the appropriate packet header?

I'm actually not sure if this applies to the multistream encoder, it
may only apply to the individual stream API. I'll ask about it.

FWIW, the relavent sentence is "opus_encode() and opus_encode_float()
return the number of bytes actually written to the packet. The return
value can be negative, which indicates that an error has occurred. If
the return value is 1 byte, then the packet does not need to be
transmitted (DTX)."

-- 
-Nathan Caldwell
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to