[FFmpeg-devel] [PATCH 1/2] avformat/dvenc: return error code of dv_assemble_frame()
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Fri Jun 19 15:28:18 EEST 2020
On Fri, Jun 12, 2020 at 10:31:56PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavformat/dvenc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
> index c71e532..b04d604 100644
> --- a/libavformat/dvenc.c
> +++ b/libavformat/dvenc.c
> @@ -406,9 +406,10 @@ static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
>
> fsize = dv_assemble_frame(s, s->priv_data, s->streams[pkt->stream_index],
> pkt->data, pkt->size, &frame);
> - if (fsize > 0) {
> - avio_write(s->pb, frame, fsize);
> + if (fsize < 0) {
> + return fsize;
> }
> + avio_write(s->pb, frame, fsize);
> return 0;
> }
>
> --
> 1.8.3.1
>
will apply the patchset tomorrow if no objection.
--
Thanks,
Limin Wang
More information about the ffmpeg-devel
mailing list