[FFmpeg-devel] [PATCH] lavfi/audio: fix size of copied samples.

Nicolas George nicolas.george at normalesup.org
Sat Jul 21 01:24:57 CEST 2012


Le tridi 3 thermidor, an CCXX, Michael Niedermayer a écrit :
> IMHO movie_dr should remove WRITE from the reference before passing it
> on, also PRESERVE would need to be removed if movie_dr keeps a second
> reference with WRITE permission, or more precissely if there exists a
> reference with PRESERVE than no other reference can have WRITE
> permission, that can be enforced on reference creation.

I believe it could be done like that, but the more I look at the code the
more I think this is not how it currently works. And obviously, the current
code works.

> this sounds quite problematic to me.
> movie_dr has a WRITE+PRESERVE reference, so does showinfo, its same
> flags but the 2 have totally different rights
> movie_dr can write and has a gurantee that noone else writes
> showinfo has no write rights nor does it know for sure movie_dr wont
> change the buffer.

I do not think this is problematic, as long as it is properly explained. And
I would not be surprised if someone comes up with a case where
distinguishing between PRESERVE|READ and PRESERVE|WRITE would be useful.

> also movie_dr can have a WRITE+PRESERVE reference and no other
> reference in which case no copy is needed later or it can keep a second
> reference implicitly or otherwise in which case a copy is needed.

I do not understand what you mean by "implicitly" here. Concerning the part
I do understand, there is not much point in requesting PRESERVE and then
giving away the reference.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120721/c6c70270/attachment.asc>


More information about the ffmpeg-devel mailing list