[x264-devel] [PATCH] Add an option for forcing POC type 0

Martin Storsjö martin at martin.st
Mon Sep 30 19:59:55 CEST 2013


On Mon, 30 Sep 2013, Jason Garrett-Glaser wrote:

>> Any opinion on adding an option like this?
>
> Have we investigated why this happens?  Does it freeze on IDR frames,
> or some other frame type, or...?

It freezes on stream variant switches in HLS.

Basically, as far as I understand the Android media player handling of 
HLS, when it switches from one quality variant to another, it doesn't 
reinitialize the decoder or anything, it just feeds the packets of the new 
quality variant into the common decoder, expecting it to cope with the 
resolution switches. (Each segment starts with SPS/PPS and an IDR frame.)


If the streams use POC type 0, the decoder in Samsung Galaxy S3 can handle 
this just fine, but when using POC type 2 (for H264 baseline) it fails to 
decode anything after the first switch.

I guess I could try to look into this without all of HLS and just calling 
the decoder right away as well - I'm pretty sure I'd end up with the same 
conclusion, that this decoder fails on resolution switches unless it uses 
POC type 0. (It doesn't seem to matter whether the new SPS has got the 
same or a different id as the previous one.)

// Martin


More information about the x264-devel mailing list