mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-09 16:19:35 +00:00
avformat/filmstripenc: Simplify writing reserved elements
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
aeee5e3967
commit
3042e71776
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include "avio_internal.h"
|
||||||
#include "rawenc.h"
|
#include "rawenc.h"
|
||||||
|
|
||||||
#define RAND_TAG MKBETAG('R','a','n','d')
|
#define RAND_TAG MKBETAG('R','a','n','d')
|
||||||
@ -43,7 +44,6 @@ static int write_trailer(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
AVStream *st = s->streams[0];
|
AVStream *st = s->streams[0];
|
||||||
int i;
|
|
||||||
|
|
||||||
avio_wb32(pb, RAND_TAG);
|
avio_wb32(pb, RAND_TAG);
|
||||||
avio_wb32(pb, st->nb_frames);
|
avio_wb32(pb, st->nb_frames);
|
||||||
@ -54,8 +54,7 @@ static int write_trailer(AVFormatContext *s)
|
|||||||
avio_wb16(pb, 0); // leading
|
avio_wb16(pb, 0); // leading
|
||||||
// TODO: should be avg_frame_rate
|
// TODO: should be avg_frame_rate
|
||||||
avio_wb16(pb, st->time_base.den / st->time_base.num);
|
avio_wb16(pb, st->time_base.den / st->time_base.num);
|
||||||
for (i = 0; i < 16; i++)
|
ffio_fill(pb, 0x00, 16); // reserved
|
||||||
avio_w8(pb, 0x00); // reserved
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user