!318 muxer添加stop日志

Merge pull request !318 from Atrotro/master
This commit is contained in:
openharmony_ci 2024-11-05 14:32:31 +00:00 committed by Gitee
commit 2c9ce16763
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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;
}