[FFmpeg-devel] [PATCH] DCX demuxer
Paul B Mahol
onemda at gmail.com
Thu Oct 18 11:24:11 CEST 2012
On 10/18/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Oct 11, 2012 at 01:14:07PM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>
>> Last frame never appears when using pipes.
> [...]
>> +static int dcx_read_packet(AVFormatContext *s, AVPacket *pkt)
>> +{
>> + DCXDemuxContext *dc = s->priv_data;
>> + int size, ret;
>> +
>> + if (dc->current_frame >= s->streams[0]->nb_frames)
>> + return AVERROR_EOF;
>> + size = dc->frame_offsets[dc->current_frame + 1] -
>> + dc->frame_offsets[dc->current_frame];
>> + if (size < 0)
>> + size = INT_MAX;
>> +
>> + ret = av_get_packet(s->pb, pkt, size);
>
> dont try to read INT_MAX sized packets
>
> otherwise LGTM
So it is ok if last frame will be lost in case input is not seekable?
Should I just abort or what?
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Republics decline into democracies and democracies degenerate into
> despotisms. -- Aristotle
>
More information about the ffmpeg-devel
mailing list