[FFmpeg-cvslog] avcodec/bsf: Check for packet payload when setting BSF EOF flag.

Jan Sebechlebsky git at videolan.org
Sun Apr 23 04:56:58 EEST 2017


ffmpeg | branch: master | Jan Sebechlebsky <sebechlebskyjan at gmail.com> | Sat Apr 22 21:56:56 2017 -0300| [f92e1af844208eb34fc0cdb2e38959c3a92165c9] | committer: James Almer

avcodec/bsf: Check for packet payload when setting BSF EOF flag.

Set BSF EOF flag only if pkt == NULL or both data and
side data are not present in packet.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
index 0f97c259cb..38b423101c 100644
--- a/libavcodec/bsf.c
+++ b/libavcodec/bsf.c
@@ -174,7 +174,7 @@ int av_bsf_init(AVBSFContext *ctx)
 
 int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
 {
-    if (!pkt) {
+    if (!pkt || (!pkt->data && !pkt->side_data_elems)) {
         ctx->internal->eof = 1;
         return 0;
     }



More information about the ffmpeg-cvslog mailing list