mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/demux: Combine "Packet corrupt" logmessages
Otherwise these statements might be torn apart by av_logs from other threads. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
07064f9bda
commit
ccd2b7f858
@ -572,14 +572,13 @@ static int handle_new_packet(AVFormatContext *s, AVPacket *pkt, int allow_passth
|
||||
|
||||
if (pkt->flags & AV_PKT_FLAG_CORRUPT) {
|
||||
av_log(s, AV_LOG_WARNING,
|
||||
"Packet corrupt (stream = %d, dts = %s)",
|
||||
pkt->stream_index, av_ts2str(pkt->dts));
|
||||
"Packet corrupt (stream = %d, dts = %s)%s.\n",
|
||||
pkt->stream_index, av_ts2str(pkt->dts),
|
||||
s->flags & AVFMT_FLAG_DISCARD_CORRUPT ? ", dropping it" : "");
|
||||
if (s->flags & AVFMT_FLAG_DISCARD_CORRUPT) {
|
||||
av_log(s, AV_LOG_WARNING, ", dropping it.\n");
|
||||
av_packet_unref(pkt);
|
||||
return 1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, ".\n");
|
||||
}
|
||||
|
||||
st = s->streams[pkt->stream_index];
|
||||
|
Loading…
Reference in New Issue
Block a user