|
@@ -352,8 +352,12 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) |
|
|
} |
|
|
} |
|
|
ret = s->oformat->write_packet(s, pkt); |
|
|
ret = s->oformat->write_packet(s, pkt); |
|
|
|
|
|
|
|
|
if (s->pb && ret >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS) |
|
|
|
|
|
avio_flush(s->pb); |
|
|
|
|
|
|
|
|
if (s->pb && ret >= 0) { |
|
|
|
|
|
if (s->flags & AVFMT_FLAG_FLUSH_PACKETS) |
|
|
|
|
|
avio_flush(s->pb); |
|
|
|
|
|
if (s->pb->error < 0) |
|
|
|
|
|
ret = s->pb->error; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|