aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bsf.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-08 20:37:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-08 20:54:15 +0200
commit47cd3c88c5f3180710494b775634398be1445fbf (patch)
treed2cf80fad09ff0bed0de398ad9976fcbab3d5e66 /libavcodec/bsf.h
parent345158aea1bac6fc8521474ed0a1f9e6ce8898e8 (diff)
downloadffmpeg-47cd3c88c5f3180710494b775634398be1445fbf.tar.gz
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>
Diffstat (limited to 'libavcodec/bsf.h')
-rw-r--r--libavcodec/bsf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h
index af035eee44..d04f1d3068 100644
--- a/libavcodec/bsf.h
+++ b/libavcodec/bsf.h
@@ -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);