mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/(lrc|scc)enc: Use avio_w8() to write a single char
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8766361fc1
commit
2b2e9afdd2
@ -79,7 +79,7 @@ static int lrc_write_header(AVFormatContext *s)
|
||||
avio_printf(s->pb, "[%s:%s]\n",
|
||||
metadata_item->key, metadata_item->value);
|
||||
}
|
||||
avio_printf(s->pb, "\n");
|
||||
avio_w8(s->pb, '\n');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -94,12 +94,12 @@ static int scc_write_packet(AVFormatContext *avf, AVPacket *pkt)
|
||||
scc->inside = 1;
|
||||
}
|
||||
if (scc->n > 0)
|
||||
avio_printf(avf->pb, " ");
|
||||
avio_w8(avf->pb, ' ');
|
||||
avio_printf(avf->pb, "%02x%02x", pkt->data[i + 1], pkt->data[i + 2]);
|
||||
scc->n++;
|
||||
}
|
||||
if (scc->inside && (scc->prev_h != h || scc->prev_m != m || scc->prev_s != s || scc->prev_f != f)) {
|
||||
avio_printf(avf->pb, "\n");
|
||||
avio_w8(avf->pb, '\n');
|
||||
scc->n = 0;
|
||||
scc->inside = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user