diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-06-12 21:06:25 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-06-19 23:12:49 +0800 |
commit | 04172d233de58cbb5a2dab6839696628a97c7b52 (patch) | |
tree | 1a328de4cb8987e974bba0766a528f5d1ab6600d /libavformat/dvenc.c | |
parent | 23d06f606e58779d47ca9d312c570b8e64f99f9e (diff) | |
download | ffmpeg-04172d233de58cbb5a2dab6839696628a97c7b52.tar.gz |
avformat/dvenc: return error code of dv_assemble_frame()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/dvenc.c')
-rw-r--r-- | libavformat/dvenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index c71e532771..b04d6044d7 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; } |