diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-14 12:12:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-02 19:41:48 +0100 |
commit | d418ca3786b18f9a1b3c0879fd8572e1bb01e3ec (patch) | |
tree | 47dccaa6f6160cb386dcec1319f1722b540a1f14 | |
parent | 805e6923035e208f1753bbdb50b76bec872692c2 (diff) | |
download | ffmpeg-d418ca3786b18f9a1b3c0879fd8572e1bb01e3ec.tar.gz |
avformat/mp3enc: Avoid SEEK_END as it is unsupported
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bf3ee6a13053d37a0c5022a324624e89f0bce8c5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mp3enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index d4b6af0204..0cd1e096d5 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -380,6 +380,7 @@ static void mp3_update_xing(AVFormatContext *s) uint16_t tag_crc; uint8_t *toc; int i, rg_size; + int64_t old_pos = avio_tell(s->pb); /* replace "Xing" identification string with "Info" for CBR files. */ if (!mp3->has_variable_bitrate) @@ -428,7 +429,7 @@ static void mp3_update_xing(AVFormatContext *s) avio_seek(s->pb, mp3->xing_frame_offset, SEEK_SET); avio_write(s->pb, mp3->xing_frame, mp3->xing_frame_size); - avio_seek(s->pb, 0, SEEK_END); + avio_seek(s->pb, old_pos, SEEK_SET); } static int mp3_write_trailer(struct AVFormatContext *s) |