forked from FFmpeg/FFmpeg
avformat/ffmenc: use ff_parse_creation_time_metadata
FYI this muxer bails out on parse error and not just warn the user. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
bf0607b6db
commit
83b01ed212
1 changed files with 2 additions and 6 deletions
|
@ -221,17 +221,13 @@ static int ffm_write_recommended_config(AVIOContext *pb, AVCodecContext *ctx, un
|
||||||
static int ffm_write_header(AVFormatContext *s)
|
static int ffm_write_header(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
FFMContext *ffm = s->priv_data;
|
FFMContext *ffm = s->priv_data;
|
||||||
AVDictionaryEntry *t;
|
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
AVCodecContext *codec;
|
AVCodecContext *codec;
|
||||||
int bit_rate, i, ret;
|
int bit_rate, i, ret;
|
||||||
|
|
||||||
if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
|
if ((ret = ff_parse_creation_time_metadata(s, &ffm->start_time, 0)) < 0)
|
||||||
ret = av_parse_time(&ffm->start_time, t->value, 0);
|
return ret;
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ffm->packet_size = FFM_PACKET_SIZE;
|
ffm->packet_size = FFM_PACKET_SIZE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue