forked from FFmpeg/FFmpeg
avcodec/bsf: Restrict ff_bsf_get_packet_ref() return values to <= 0
Up until now the documentation of ff_bsf_get_packet_ref() allowed return values >= 0 in case of success, whereas av_bsf_receive_packet() only allows 0 on success. Given that for some bitstream filters the return value of ff_bsf_get_packet_ref() is forwarded to the caller of av_bsf_receive_packet() without any filtering, there would be a problem if ff_bsf_get_packet_ref() actually returned values > 0. But it currently doesn't and there is no reason why it should ever do so. Therefore this commit aligns the return values of these functions by restricting ff_bsf_get_packet_ref() to always returns 0 on success. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
345158aea1
commit
47cd3c88c5
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt);
|
|||
* @param ctx pointer to AVBSFContext of filter
|
||||
* @param pkt pointer to packet to move reference to
|
||||
*
|
||||
* @return 0>= on success, negative AVERROR in case of failure
|
||||
* @return 0 on success, negative AVERROR in case of failure
|
||||
*/
|
||||
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue