Revision c957c854 ffmpeg.c

View differences:

ffmpeg.c
672 672
            AVPacket pkt;
673 673
            av_init_packet(&pkt);
674 674

  
675
            av_fifo_read(ost->fifo, audio_buf, frame_bytes);
675
            av_fifo_generic_read(ost->fifo, frame_bytes, NULL, audio_buf);
676 676

  
677 677
            //FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio()
678 678

  
......
1452 1452
                            if(fifo_bytes > 0 && enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
1453 1453
                                int fs_tmp = enc->frame_size;
1454 1454
                                enc->frame_size = fifo_bytes / (2 * enc->channels);
1455
                                av_fifo_read(ost->fifo, (uint8_t *)samples, fifo_bytes);
1455
                                av_fifo_generic_read(ost->fifo, fifo_bytes, NULL, samples);
1456 1456
                                    ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
1457 1457
                                enc->frame_size = fs_tmp;
1458 1458
                            }

Also available in: Unified diff