mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-28 23:09:59 +02:00
sout: enforce single frames in pf_send
The stream output API is unclear on chained frame support. Currently, modules decide if they want to support them or not. As it seems that the current consensus is to support single frames only, this assert will help notifying and fixing inconsistents behavior on that regard. Note that it could be perfectly valid to pass frames one by one from a chain without having to NULL every `p_next` entry for each elements so this assert might be deleted once it is clear that all stream output modules are fixed to support single frames only.
This commit is contained in:
parent
7779bf5a36
commit
f5872be459
@ -308,6 +308,9 @@ VLC_API void sout_StreamIdDel(sout_stream_t *, void *id);
|
||||
* Takes ownership of the frame, it should be considered as invalid
|
||||
* and released after this call.
|
||||
*
|
||||
* \warning Only single frames are expected through this call, for frame chains,
|
||||
* you'll have to call this for each frames.
|
||||
*
|
||||
* \param id The ES identifier that sent the frame.
|
||||
*
|
||||
* \retval VLC_SUCCESS on success.
|
||||
|
@ -716,6 +716,8 @@ int sout_StreamIdSend(sout_stream_t *s, void *id, vlc_frame_t *f)
|
||||
{
|
||||
int val;
|
||||
|
||||
assert(f->p_next == NULL);
|
||||
|
||||
sout_StreamLock(s);
|
||||
val = s->ops->send(s, id, f);
|
||||
sout_StreamUnlock(s);
|
||||
|
Loading…
Reference in New Issue
Block a user