aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/segafilm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
commit2692067a45e4cb4ce0028e170673f2b2f5039721 (patch)
tree19b10f28c74700113729a7ae6861c734e8bfab01 /libavformat/segafilm.c
parent4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff)
downloadffmpeg-2692067a45e4cb4ce0028e170673f2b2f5039721.tar.gz
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r--libavformat/segafilm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index d984a3b10b..d2954881ed 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -233,6 +233,7 @@ static int film_read_packet(AVFormatContext *s,
return AVERROR_NOMEM;
if(pkt->size < 10)
return -1;
+ pkt->pos= url_ftell(pb);
ret = get_buffer(pb, pkt->data, 10);
/* skip the non-spec CVID bytes */
url_fseek(pb, film->cvid_extra_bytes, SEEK_CUR);
@@ -254,6 +255,7 @@ static int film_read_packet(AVFormatContext *s,
film->stereo_buffer = av_malloc(film->stereo_buffer_size);
}
+ pkt->pos= url_ftell(pb);
ret = get_buffer(pb, film->stereo_buffer, sample->sample_size);
if (ret != sample->sample_size)
ret = AVERROR_IO;
@@ -272,9 +274,7 @@ static int film_read_packet(AVFormatContext *s,
}
}
} else {
- if (av_new_packet(pkt, sample->sample_size))
- return AVERROR_NOMEM;
- ret = get_buffer(pb, pkt->data, sample->sample_size);
+ ret= av_get_packet(pb, pkt, sample->sample_size);
if (ret != sample->sample_size)
ret = AVERROR_IO;
}