Revision 3ea1ce21

View differences:

libavformat/dv.c
391 391

  
392 392
static void dv_inject_audio(DVMuxContext *c, const uint8_t* pcm, uint8_t* frame_ptr)
393 393
{
394
    int i, j, d, of;
394
    int i, j, d, of, size;
395
    size = 4 * dv_audio_frame_size(c->sys, c->frames);
395 396
    for (i = 0; i < c->sys->difseg_size; i++) {
396 397
       frame_ptr += 6 * 80; /* skip DIF segment header */
397 398
       for (j = 0; j < 9; j++) {
398 399
          for (d = 8; d < 80; d+=2) {
399 400
	     of = c->sys->audio_shuffle[i][j] + (d - 8)/2 * c->sys->audio_stride;
401
	     if (of*2 >= size)
402
	         continue;
403
	     
400 404
	     frame_ptr[d] = pcm[of*2+1]; // FIXME: may be we have to admit
401 405
	     frame_ptr[d+1] = pcm[of*2]; //        that DV is a big endian PCM       
402 406
          }
tests/libav.regression.ref
25 25
fea20ced22451312dd463110e594eda6 *./data/b-libav.nut
26 26
332415 ./data/b-libav.nut
27 27
./data/b-libav.nut CRC=001a3415
28
b28918de1199e60a7ac235eefacb7d3b *./data/b-libav.dv
29
3600000 ./data/b-libav.dv
30
./data/b-libav.dv CRC=03701687
28 31
9a9da315747599f7718cc9a9a09c21ff *./data/b-libav.pbm
29 32
317075 ./data/b-libav.pbm
30 33
./data/b-libav.pbm CRC=a1057fd1
tests/regression.sh
516 516
do_ffmpeg_crc $file -i $file
517 517

  
518 518
# dv
519
#file=${outfile}libav.dv
520
#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
521
#do_ffmpeg_crc $file -i $file
519
file=${outfile}libav.dv
520
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
521
do_ffmpeg_crc $file -i $file
522 522

  
523 523
# XXX: need mpegts tests (add bitstreams or add output capability in ffmpeg)
524 524

  

Also available in: Unified diff