On Tue, 13 Dec 2011, Luca Barbato wrote:
On 13/12/11 15:52, Martin Storsjö wrote:
On Tue, 13 Dec 2011, Justin Ruggles wrote:
On 12/13/2011 09:06 AM, Martin Storsjö wrote:
On Tue, 13 Dec 2011, Justin Ruggles wrote:
I can't think of anything better right now, but it does seem a little
odd to me. Before decoding, the sample_rate is set by the user (via the
flv demuxer). The nellymoser decoder doesn't currently touch
sample_rate. If the point of the flag is to have the change come from
the decoder, what advantage does that have over the demuxer changing
the
sample_rate directly? I know that the user changing certain fields
after
init() will lead to bad things sometimes, but we don't have any
documented rules about such things do we?
The advantage is that sample_rate is updated only once you actually
decode
that packet - you might demux and fill a buffer of packets, but the
sample
rate change isn't made effective until you actually decode them,
otherwise
you'd get wrong sample rate for a few of the preceding packets.
indeed. sounds like an alright solution then.
Ok, I'll push this in a little while then.
Just make so the flag is generic enough to be reused. new extradata
sounds generic enough ^^; (maybe a bit too much).
New extradata is generic enough yes, but nellymoser doesn't have extradata
as such, and I don't want to start packing flv flag fields as nellymoser
extradata. So these patches mark it simply as what it is - the flv flags
field passed along with the data. If the source doesn't have flv flags,
there's no data to pass along (and no standard way of conveying this
info).
As I said, if I later get to implementing the same for AAC in FLV, I'll do
that as "new extradata", since the info for AAC actually is passed as
extradata, and there it is much more clear that new extradata is passed
along only occasionally when it has changed, not for every packet like it
is here.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel