diff options
author | Roman Shaposhnik <roman@shaposhnik.org> | 2004-07-27 17:58:47 +0000 |
---|---|---|
committer | Roman Shaposhnik <roman@shaposhnik.org> | 2004-07-27 17:58:47 +0000 |
commit | 3ea1ce214646cb91a2b7d1048af00a1c228416a6 (patch) | |
tree | 11eef16ad5fb542aac1c35169be93bfa3dae3e69 | |
parent | da66b6313e61a861321b7d62a3d12a38877784bb (diff) | |
download | ffmpeg-3ea1ce214646cb91a2b7d1048af00a1c228416a6.tar.gz |
* fixing a small quirk with DV audio muxing
* making DV testable via libavtest
Originally committed as revision 3355 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/dv.c | 6 | ||||
-rw-r--r-- | tests/libav.regression.ref | 3 | ||||
-rwxr-xr-x | tests/regression.sh | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c index 0de099620b..bda7d94a9d 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -391,12 +391,16 @@ static void dv_format_frame(DVMuxContext *c, uint8_t* buf) 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 } diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index 830df4e9b2..3c6a6d6a87 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -25,6 +25,9 @@ b57e3c4e0f27cbd0bf7b7fafb142fe7f *./data/b-libav.ffm fea20ced22451312dd463110e594eda6 *./data/b-libav.nut 332415 ./data/b-libav.nut ./data/b-libav.nut CRC=001a3415 +b28918de1199e60a7ac235eefacb7d3b *./data/b-libav.dv +3600000 ./data/b-libav.dv +./data/b-libav.dv CRC=03701687 9a9da315747599f7718cc9a9a09c21ff *./data/b-libav.pbm 317075 ./data/b-libav.pbm ./data/b-libav.pbm CRC=a1057fd1 diff --git a/tests/regression.sh b/tests/regression.sh index 8ad96dcc41..ee42d282ad 100755 --- a/tests/regression.sh +++ b/tests/regression.sh @@ -516,9 +516,9 @@ do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -a do_ffmpeg_crc $file -i $file # dv -#file=${outfile}libav.dv -#do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -ar 48000 -r 25 -s pal -ac 2 $file -#do_ffmpeg_crc $file -i $file +file=${outfile}libav.dv +do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -ar 48000 -r 25 -s pal -ac 2 $file +do_ffmpeg_crc $file -i $file # XXX: need mpegts tests (add bitstreams or add output capability in ffmpeg) |