[FFmpeg-cvslog] avformat/dss: Set packet position correctly
Michael Niedermayer
git at videolan.org
Tue Feb 24 15:58:31 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 24 14:54:20 2015 +0100| [847daac5c0130c190849c90ae34de873e7554478] | committer: Michael Niedermayer
avformat/dss: Set packet position correctly
pos previously was set but then overwritten
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=847daac5c0130c190849c90ae34de873e7554478
---
libavformat/dss.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavformat/dss.c b/libavformat/dss.c
index 5ee69a1..85cd26a 100644
--- a/libavformat/dss.c
+++ b/libavformat/dss.c
@@ -211,12 +211,11 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
{
DSSDemuxContext *ctx = s->priv_data;
int read_size, ret, offset = 0, buff_offset = 0;
+ int64_t pos = avio_tell(s->pb);
if (ctx->counter == 0)
dss_skip_audio_header(s, pkt);
- pkt->pos = avio_tell(s->pb);
-
if (ctx->swap) {
read_size = DSS_FRAME_SIZE - 2;
buff_offset = 3;
@@ -230,6 +229,7 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
pkt->duration = 0;
+ pkt->pos = pos;
pkt->stream_index = 0;
if (ctx->counter < 0) {
@@ -265,11 +265,11 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
{
DSSDemuxContext *ctx = s->priv_data;
int size, byte, ret, offset;
+ int64_t pos = avio_tell(s->pb);
if (ctx->counter == 0)
dss_skip_audio_header(s, pkt);
- pkt->pos = avio_tell(s->pb);
/* We make one byte-step here. Don't forget to add offset. */
byte = avio_r8(s->pb);
if (byte == 0xff)
@@ -282,6 +282,7 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
ret = av_new_packet(pkt, size);
if (ret < 0)
return ret;
+ pkt->pos = pos;
pkt->data[0] = byte;
offset = 1;
More information about the ffmpeg-cvslog
mailing list