[PATCH]Write total number of tracks to m4a
Hi! Attached patch fixes ticket #2157 for me. Please comment, Carl Eugen
On Thu, Aug 01, 2013 at 12:29:58AM +0200, Carl Eugen Hoyos wrote:
Hi!
Attached patch fixes ticket #2157 for me.
Please comment, Carl Eugen
sould be ok
movenc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 8da3f932db6a70d1f85548740f12623e7adc4a68 patchtrkn.diff diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 42ec3f2..1b3cebb 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2022,6 +2022,12 @@ static int mov_write_trkn_tag(AVIOContext *pb, MOVMuxContext *mov, AVDictionaryEntry *t = av_dict_get(s->metadata, "track", NULL, 0); int size = 0, track = t ? atoi(t->value) : 0; if (track) { + int i = 1, tracks = 0; + while (t->value[i]) + if (t->value[i++] == '/') { + tracks = atoi(&t->value[i]); + break;
might be simpler with strchr() otherwise LGTM [..] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope
On Thu, Aug 01, 2013 at 10:13:00AM +0200, Carl Eugen Hoyos wrote:
On Thursday 01 August 2013 01:52:56 am Michael Niedermayer wrote:
On Thu, Aug 01, 2013 at 12:29:58AM +0200, Carl Eugen Hoyos wrote:
Attached patch fixes ticket #2157 for me.
might be simpler with strchr()
New patch attached.
Please comment, Carl Eugen
LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them.
participants (3)
-
Carl Eugen Hoyos -
Michael Niedermayer -
Paul B Mahol