[FFmpeg-cvslog] avformat/av1dec: Redo flushing of bsf
Andreas Rheinhardt
git at videolan.org
Thu Nov 14 17:03:54 EET 2019
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Nov 14 15:06:27 2019 +0100| [f01f9f179389befe9bce7639088e453146a39915] | committer: James Almer
avformat/av1dec: Redo flushing of bsf
The current approach has two different calls to av_bsf_send_packet():
A normal one, sending a packet; and an extraordinary one just for
flushing. These can be unified into one by making use of the newly
documented fact that av_bsf_send_packet() allows to signal flushing via
empty packets (i.e. packets without data and side-data).
This also fixes CID 1455685 which resulted from the fact that the call
for flushing was not checked given that it couldn't fail.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f01f9f179389befe9bce7639088e453146a39915
---
libavformat/av1dec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c
index a0cad55668..5e7a057cb7 100644
--- a/libavformat/av1dec.c
+++ b/libavformat/av1dec.c
@@ -193,7 +193,6 @@ retry:
if (avio_feof(s->pb)) {
if (c->temporal_unit_size || c->frame_unit_size)
return AVERROR(EIO);
- av_bsf_send_packet(c->bsf, NULL);
goto end;
}
@@ -222,6 +221,7 @@ retry:
c->temporal_unit_size -= obu_unit_size + len;
c->frame_unit_size -= obu_unit_size + len;
+end:
ret = av_bsf_send_packet(c->bsf, pkt);
if (ret < 0) {
av_log(s, AV_LOG_ERROR, "Failed to send packet to "
@@ -229,7 +229,6 @@ retry:
return ret;
}
-end:
ret = av_bsf_receive_packet(c->bsf, pkt);
if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
av_log(s, AV_LOG_ERROR, "av1_frame_merge filter failed to "
More information about the ffmpeg-cvslog
mailing list