If error is ENOSPACE just give up. ffmpeg crashes if we try again.
This commit is contained in:
parent
947132284d
commit
81fc392bc2
|
@ -497,8 +497,14 @@ bool VideoStore::open() {
|
||||||
Debug(1, "using movflags %s", movflags_entry->value);
|
Debug(1, "using movflags %s", movflags_entry->value);
|
||||||
}
|
}
|
||||||
if ((ret = avformat_write_header(oc, &opts)) < 0) {
|
if ((ret = avformat_write_header(oc, &opts)) < 0) {
|
||||||
Warning("Unable to set movflags trying with defaults.");
|
// we crash if we try again
|
||||||
ret = avformat_write_header(oc, nullptr);
|
if (ENOSPC != ret) {
|
||||||
|
Warning("Unable to set movflags trying with defaults.%d %s",
|
||||||
|
ret, av_make_error_string(ret).c_str());
|
||||||
|
|
||||||
|
ret = avformat_write_header(oc, nullptr);
|
||||||
|
Debug(1, "Done %d", ret);
|
||||||
|
}
|
||||||
} else if (av_dict_count(opts) != 0) {
|
} else if (av_dict_count(opts) != 0) {
|
||||||
Info("some options not used, turn on debugging for a list.");
|
Info("some options not used, turn on debugging for a list.");
|
||||||
AVDictionaryEntry *e = nullptr;
|
AVDictionaryEntry *e = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue