diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-04-24 18:48:25 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-04-24 18:48:25 +0100 |
| commit | 740768a0d6b13ecc3eb68219f6eee208ab4ecc1d (patch) | |
| tree | ec8265f3f4c248736c083df3347baff0bbe1ed07 /rotord/libavexporter.h | |
| parent | c4edc9359dd6cfb0836d0d370fe008f308bc0156 (diff) | |
tinkering with audio speed
Diffstat (limited to 'rotord/libavexporter.h')
| -rw-r--r-- | rotord/libavexporter.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rotord/libavexporter.h b/rotord/libavexporter.h index fd2da93..24b656c 100644 --- a/rotord/libavexporter.h +++ b/rotord/libavexporter.h @@ -29,6 +29,11 @@ * @example doc/examples/muxing.c */ + + // + //http://stackoverflow.com/questions/14871916/can-i-concurrently-read-an-earlier-section-of-an-mp4-file-while-streaming-writin + // + #include <stdlib.h> #include <stdio.h> #include <string> @@ -208,12 +213,15 @@ namespace libav { sampleptr=new uint8_t[bufsize]; memset(sampleptr,0,bufsize); } + avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt, sampleptr, audio_input_frame_size * av_get_bytes_per_sample(c->sample_fmt) * - c->channels, 1); - + c->channels, 0); //; + //frame->sample_rate=44100; //hard coded input rate- nope, this doesn't help + //frame->format=AV_SAMPLE_FMT_S16P; + //?? why is ffmpeg reporting fltp as the sample format??? doesn't seem to have an effect to change this though ret = avcodec_encode_audio2(c, &pkt, frame, &got_packet); if (!samples) { free(sampleptr); |
