Skip to content

Commit

Permalink
Populate OTI
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Dec 22, 2023
1 parent fa1edf0 commit 2bf0edc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.10 (unreleased)
======
* Fixed codec attribute for AAC.

1.1.9 (202310-27)
=====
* Added support for AV_CODEC_ID_WRAPPED_AVFRAME
Expand Down
10 changes: 6 additions & 4 deletions av/av_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define Bytes_val String_val
#endif

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/audio_fifo.h>
Expand Down Expand Up @@ -2473,15 +2474,16 @@ CAMLprim value ocaml_av_codec_attr(value _stream) {
} else if (stream->codecpar->codec_id == AV_CODEC_ID_MP3) {
snprintf(attr, sizeof(attr), "mp4a.40.34");
} else if (stream->codecpar->codec_id == AV_CODEC_ID_AAC) {
/* TODO : For HE-AAC, HE-AACv2, the last digit needs to be set to 5 and 29
* respectively */
snprintf(attr, sizeof(attr), "mp4a.40.2");
if (stream->codecpar->profile != FF_PROFILE_UNKNOWN)
snprintf(attr, sizeof(attr), "mp4a.40.%d", stream->codecpar->profile + 1);
else
goto fail;
} else if (stream->codecpar->codec_id == AV_CODEC_ID_AC3) {
snprintf(attr, sizeof(attr), "ac-3");
} else if (stream->codecpar->codec_id == AV_CODEC_ID_EAC3) {
snprintf(attr, sizeof(attr), "ec-3");
} else {
fail:
fail:
CAMLreturn(Val_none);
}

Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(lang dune 3.6)

(name ffmpeg)
(version 1.1.9)
(version 1.1.10)
(source (github savonet/ocaml-ffmpeg))
(license LGPL-2.1-only)
(authors "The Savonet Team <[email protected]>")
Expand Down

0 comments on commit 2bf0edc

Please sign in to comment.