You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
libavformat/oggparseflac.c: Parse ogg/flac comments in new ogg packets, add them to ogg stream
new_metadata.
This commit is contained in:
@@ -85,6 +85,8 @@ flac_packet (AVFormatContext * s, int idx)
|
||||
{
|
||||
struct ogg *ogg = s->priv_data;
|
||||
struct ogg_stream *os = ogg->streams + idx;
|
||||
AVStream *st = s->streams[idx];
|
||||
int ret;
|
||||
|
||||
if (os->psize > OGG_FLAC_MAGIC_SIZE &&
|
||||
!memcmp(
|
||||
@@ -95,6 +97,11 @@ flac_packet (AVFormatContext * s, int idx)
|
||||
|
||||
if (os->psize > 0 &&
|
||||
((os->buf[os->pstart] & 0x7F) == FLAC_METADATA_TYPE_VORBIS_COMMENT)) {
|
||||
ret = ff_vorbis_update_metadata(s, st, os->buf + os->pstart + 4,
|
||||
os->psize - 4);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -5,6 +5,7 @@ Stream ID: 0, frame PTS: 0, metadata: N/A
|
||||
Stream ID: 0, packet PTS: 4608, packet DTS: 4608
|
||||
Stream ID: 0, frame PTS: 4608, metadata: N/A
|
||||
Stream ID: 0, packet PTS: 0, packet DTS: 0
|
||||
Stream ID: 0, frame PTS: 0, metadata: N/A
|
||||
Stream ID: 0, new metadata: encoder=Lavc61.19.100 flac:title=Second Stream
|
||||
Stream ID: 0, frame PTS: 0, metadata: encoder=Lavc61.19.100 flac:title=Second Stream
|
||||
Stream ID: 0, packet PTS: 4608, packet DTS: 4608
|
||||
Stream ID: 0, frame PTS: 4608, metadata: N/A
|
||||
|
Reference in New Issue
Block a user