[FFmpeg-devel] [PATCH] ffprobe: Stash and use width and height before opening the codec

Michael Niedermayer michaelni at gmx.at
Fri Mar 8 19:30:28 CET 2013


On Fri, Mar 08, 2013 at 06:21:11PM +0100, Stefano Sabatini wrote:
> On date Friday 2013-03-08 17:45:00 +0100, Michael Niedermayer encoded:
> > On Fri, Mar 08, 2013 at 12:21:24AM +0100, Stefano Sabatini wrote:
> > > On date Thursday 2013-03-07 12:40:12 +0100, Michael Niedermayer encoded:
> > > > On Wed, Mar 06, 2013 at 10:52:34PM -0500, Derek Buitenhuis wrote:
> > > > > On 2013-03-06 8:58 PM, Michael Niedermayer wrote:
> > > > > > -    if (!( avctx->coded_width && avctx->coded_height && avctx->width && avctx->height && avctx->codec_id == AV_CODEC_ID_H264)){
> > > > > > +    if (!( avctx->coded_width && avctx->coded_height && avctx->width && avctx->height &&
> > > > > > +           (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_VP6F))){
> > > > > 
> > > > > I dislike this. This is a codec specific hack which could be handled
> > > > > generically in ffprobe.c...
> > > > 
> > > > ffprobe is the only application affected by this ?
> > > 
> > > I don't like the hack as well, but the alternative is an
> > > application-level hack (which possibly affects all the applications
> > > using the API that way), so hack for hack I prefer the less invasive
> > > hack.
> 
> > > 
> > > So the question is: why is the hack required for h264 and vp6f in the
> > > first place (and only for those codecs)?
> > 
> > because the set coded_width != width for the purpose of croping
> > and the generic code in utils.c messes that up on calling open()
> 
> Look, I'm for the library-level hack if that works, but please let's
> try to find a less hacky solution (I don't have idea how cropping
> relates to coded_w/h, to VP6F specifically and what "messes up" means
> in this case and I'd prefer other people to deal with that).
> 
> As is, the code is not particularly intelligible, unless you have a
> familiarity with the internal working of those codecs (which is not
> good for generic code).

i agree but i dont know a simple & pretty solution to this ATM ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130308/c64523ee/attachment.asc>


More information about the ffmpeg-devel mailing list