diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-04-17 12:37:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-04-17 12:37:39 +0000 |
commit | d728e3cd2883da3a5f4067082d2641c228ed9c66 (patch) | |
tree | d91ff6d5b616c82abd00bbf09151178831afd423 | |
parent | 95f3019a5193712a49cdcf9f2bc460e5c94fbc94 (diff) | |
download | ffmpeg-d728e3cd2883da3a5f4067082d2641c228ed9c66.tar.gz |
Moving variable declarations in asf_build_simple_index() to clarify&prettify code.
Originally committed as revision 18543 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/asfdec.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 7b22e68997..3423987db6 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -986,17 +986,15 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index) { ff_asf_guid g; ASFContext *asf = s->priv_data; - int64_t gsize, itime; - int64_t pos, current_pos, index_pts; + int64_t current_pos= url_ftell(s->pb); int i; - int pct,ict; - - current_pos = url_ftell(s->pb); url_fseek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET); get_guid(s->pb, &g); if (!guidcmp(&g, &index_guid)) { - gsize = get_le64(s->pb); + int64_t itime; + int pct, ict; + int64_t gsize= get_le64(s->pb); get_guid(s->pb, &g); itime=get_le64(s->pb); pct=get_le32(s->pb); @@ -1006,11 +1004,10 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index) for (i=0;i<ict;i++){ int pktnum=get_le32(s->pb); int pktct =get_le16(s->pb); - av_log(s, AV_LOG_DEBUG, "pktnum:%d, pktct:%d\n", pktnum, pktct); - - pos=s->data_offset + asf->packet_size*(int64_t)pktnum; - index_pts=av_rescale(itime, i, 10000); + int64_t pos = s->data_offset + asf->packet_size*(int64_t)pktnum; + int64_t index_pts= av_rescale(itime, i, 10000); + av_log(s, AV_LOG_DEBUG, "pktnum:%d, pktct:%d\n", pktnum, pktct); av_add_index_entry(s->streams[stream_index], pos, index_pts, asf->packet_size, 0, AVINDEX_KEYFRAME); } asf->index_read= 1; |