[FFmpeg-devel] [PATCH] PGS subtitle blanking and positioning

Reimar Döffinger Reimar.Doeffinger
Wed Sep 29 19:27:11 CEST 2010


On Sun, Sep 26, 2010 at 01:38:16PM -0700, Mark Goodman wrote:
> The attached patch makes subtitles blank instead of merely timing out
> and parses previously ignored position information. I noticed some
> subtitles positioned outside a 2.35:1 aspect ratio video. In the
> packet dump, a few presentation segments had 0x40 for the block byte.
> I tested this patch with MythTV trunk.

Obviously it has to be tested with FFmpeg as well (e.g. by transcoding
to XSUB and check that the result works not worse than before).

> @@ -280,7 +280,7 @@
>  
>      /* Next byte is the state. */
>      block = bytestream_get_byte(&buf);;
> -    if (block == 0x80) {
> +    if (block == 0x80 || block == 0x40) {

This seems unrelated to the blanking, so should go in a separate patch.

> @@ -327,10 +322,6 @@
>   * @param buf pointer to the packet to process
>   * @param buf_size size of packet to process
>   * @todo TODO: Fix start time, relies on correct PTS, currently too late
> - *
> - * @todo TODO: Fix end time, normally cleared by a second display
> - * @todo       segment, which is currently ignored as it clears
> - * @todo       the subtitle too early.

Why does this issue no longer exist?

> @@ -345,6 +336,9 @@
>       */
>  
>      memset(sub, 0, sizeof(*sub));
> +    if (ctx->presentation.blank) {
> +        return 1;
> +    }

Pointless {}



More information about the ffmpeg-devel mailing list