mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-26 20:50:34 +00:00
commit
2c9ce16763
@ -4969,9 +4969,16 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
|
||||
for (i = 0; i < mov->nb_streams; i++) {
|
||||
if (mov->tracks[i].entry > 0 || mov->flags & FF_MOV_FLAG_FRAGMENT ||
|
||||
mov->mode == MODE_AVIF) {
|
||||
int ret = mov_write_trak_tag(s, pb, mov, &(mov->tracks[i]), i < s->nb_streams ? s->streams[i] : NULL);
|
||||
if (ret < 0)
|
||||
int ret = mov_write_trak_tag(s, pb, mov, &(mov->tracks[i]), i < s->nb_streams ? s->streams[i] : NULL);
|
||||
if (ret < 0) {
|
||||
#ifdef OHOS_OPT_COMPAT
|
||||
av_log(NULL, AV_LOG_ERROR, "Failed to write track %d.\n", i);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
#ifdef OHOS_OPT_COMPAT
|
||||
av_log(NULL, AV_LOG_INFO, "Wrote track %d successfully.\n", i);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (mov->flags & FF_MOV_FLAG_FRAGMENT)
|
||||
@ -8145,6 +8152,13 @@ static int mov_write_trailer(AVFormatContext *s)
|
||||
return res;
|
||||
}
|
||||
}
|
||||
#ifdef OHOS_OPT_COMPAT
|
||||
if (res == 0) {
|
||||
av_log(s, AV_LOG_INFO, "Trailer written successfully.\n");
|
||||
} else {
|
||||
av_log(s, AV_LOG_ERROR, "Error writing trailer: %d\n", res);
|
||||
}
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user