Mercurial > libavformat.hg
changeset 504:cb0b5994f3e0 libavformat
* fixing a small quirk with DV audio muxing
* making DV testable via libavtest
author | romansh |
---|---|
date | Tue, 27 Jul 2004 17:58:47 +0000 |
parents | f98831a3dc73 |
children | e996e7da971c |
files | dv.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dv.c Sun Jul 25 23:36:44 2004 +0000 +++ b/dv.c Tue Jul 27 17:58:47 2004 +0000 @@ -391,12 +391,16 @@ static void dv_inject_audio(DVMuxContext *c, const uint8_t* pcm, uint8_t* frame_ptr) { - int i, j, d, of; + int i, j, d, of, size; + size = 4 * dv_audio_frame_size(c->sys, c->frames); for (i = 0; i < c->sys->difseg_size; i++) { frame_ptr += 6 * 80; /* skip DIF segment header */ for (j = 0; j < 9; j++) { for (d = 8; d < 80; d+=2) { of = c->sys->audio_shuffle[i][j] + (d - 8)/2 * c->sys->audio_stride; + if (of*2 >= size) + continue; + frame_ptr[d] = pcm[of*2+1]; // FIXME: may be we have to admit frame_ptr[d+1] = pcm[of*2]; // that DV is a big endian PCM }