ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@gmail.com> | 
Fri May  8 20:37:24 2020 +0200| [47cd3c88c5f3180710494b775634398be1445fbf] | 
committer: Andreas Rheinhardt

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 <jamr...@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47cd3c88c5f3180710494b775634398be1445fbf
---

 libavcodec/bsf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to