# HG changeset patch # User michael # Date 1160524185 0 # Node ID 8e0ee2faf4d5a935618af9bf5570e8ea6722ba19 # Parent 31ab2ac4e1730b8b994462a19a2d54546c297d65 set duration and timebase (based on a patch by Simon Morlat simon.morlat linphone org) diff -r 31ab2ac4e173 -r 8e0ee2faf4d5 amr.c --- a/amr.c Tue Oct 10 23:45:12 2006 +0000 +++ b/amr.c Tue Oct 10 23:49:45 2006 +0000 @@ -124,6 +124,7 @@ 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 @@ 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)