diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-03-01 15:21:53 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-03-01 15:21:53 +0000 |
commit | 8223bca50d6f13418308774a00fd373b437b9709 (patch) | |
tree | 6bfa86ea491915d1b9baf10bd952a3096ed81631 /libavformat | |
parent | 1894edeb745c7eac13e2a1f4e7cfa10cbf9f04f5 (diff) | |
download | ffmpeg-8223bca50d6f13418308774a00fd373b437b9709.tar.gz |
10l forgot to set packet_size
Originally committed as revision 5086 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avidec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index ca66ba4b09..aee27ec506 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -34,7 +34,7 @@ typedef struct AVIStream { int scale; int rate; - int sample_size; /* audio only data */ + int sample_size; /* size of one sample (or packet) (in the rate/scale sense) in bytes */ int start; int64_t cum_len; /* temporary storage (used during seek) */ @@ -474,8 +474,11 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) url_fseek(&s->pb, pos + 8, SEEK_SET); // av_log(NULL, AV_LOG_DEBUG, "pos=%Ld\n", pos); + assert(best_ast->remaining <= best_ast->packet_size); + avi->stream_index= best_stream_index; if(!best_ast->remaining) + best_ast->packet_size= best_ast->remaining= best_st->index_entries[i].size; } } @@ -509,7 +512,7 @@ resync: // pkt->dts += ast->start; if(ast->sample_size) pkt->dts /= ast->sample_size; -//av_log(NULL, AV_LOG_DEBUG, "dts:%Ld offset:%d %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, n, size); +//av_log(NULL, AV_LOG_DEBUG, "dts:%Ld offset:%Ld %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size); pkt->stream_index = avi->stream_index; if (st->codec->codec_type == CODEC_TYPE_VIDEO) { |