On 07/20/2014 03:28 PM, j...@v2v.cc wrote:
> On 07/20/2014 03:13 PM, Anton Khirnov wrote:
>> Could you share the sample?
>> This really sounds like a bug elsewhere that should be fixed.
>
> Here a short clip http://v2v.cc/~j/samples/emtpy_language.mpg
>
Found the issue for this sample in mpegts.c, patch attached. Still think
the matroskaenc part should be applied too since setting language to an
empty string is always wrong and other decoders might have the same issue.
--- Begin Message ---
---
libavformat/mpegts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 5d8b08c..e49be9c 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1412,7 +1412,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
break;
}
}
- if (i) {
+ if (i && language[0] != 0) {
language[i - 1] = 0;
av_dict_set(&st->metadata, "language", language, 0);
}
--- End Message ---
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel