New submission from TGOS <t...@gmx.net>:

Trying to use libavcodec to decode MPEG2 video streams from DVB-T TV. I have my
own transport stream parser and also decode the PES packets myself, finally I
feed the raw ES streams into a avparser (via av_parser_parse2()) and finally
decode them using avcodec_decode_video2(). This works quite well for most DVB-T
streams, but usually causes some mpeg_decode_postinit() messages until the
decoder becomes aware of the decoded picture dimension (internal width and
height of the decoder are both zero). This usually happens after 1-2 seconds of
video, however, there is one DVB-T channel, where it never happens and there is
no way to force a dimension onto the decoder.

I can call avcodec_set_dimensions() on the codec, but that has no influence on
the fact that this check fails because width and height are zero:

if( (s->width == 0 )||(s->height == 0))
   return -2;


Code sample from trunk/libavcodec/mpeg12.c
http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/mpeg12_8c-source.html#l01246

I cannot feed the correct dimension into the decoder and if the stream is not
sending appropriate information on time or never, the stream cannot be decoded.

Why is it not possible to "force" dimension on the decoder? If I switch to a
different stream, so the decoder gets the dimension set and then back to the
problematic one, it decodes just fine. Thus the only problem is that the decoder
does not know the dimension and there is no public way to get it into the
decoder (other than patching livacodec source code).

----------
messages: 11047
priority: normal
status: new
substatus: new
title: Cannot Set Width/Height for MPEG2 Stream Decoding (causing 
mpeg_decode_postinit errors)
type: bug

________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2063>
________________________________________________

Reply via email to