diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-10 23:49:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-10 23:49:45 +0000 |
commit | ce2f3c8b0cdbc1a325a484b0bb4fc0af7ec41c18 (patch) | |
tree | e5d11d7158c4ba606ca758a40aac4c5c00195748 /libavformat | |
parent | b1bf48aa91ede6ff5c899bd9f808851de097d986 (diff) | |
download | ffmpeg-ce2f3c8b0cdbc1a325a484b0bb4fc0af7ec41c18.tar.gz |
set duration and timebase (based on a patch by Simon Morlat simon.morlat linphone org)
Originally committed as revision 6634 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/amr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/amr.c b/libavformat/amr.c index 5ccef995b5..efdfb1e36e 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -124,6 +124,7 @@ static int amr_read_header(AVFormatContext *s, st->codec->channels = 1; st->codec->sample_rate = 8000; } + av_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } @@ -169,6 +170,7 @@ static int amr_read_packet(AVFormatContext *s, pkt->stream_index = 0; pkt->pos= url_ftell(&s->pb); pkt->data[0]=toc; + pkt->duration= enc->codec_id == CODEC_ID_AMR_NB ? 160 : 320; read = get_buffer(&s->pb, pkt->data+1, size-1); if (read != size-1) |