avformat/dvenc: return error code of dv_assemble_frame()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-06-12 21:06:25 +08:00
parent 23d06f606e
commit 04172d233d

View File

@ -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;
}