~ubuntu-branches/ubuntu/vivid/gstreamer-vaapi/vivid

« back to all changes in this revision

Viewing changes to patches/videoparsers/0004-h264parse-default-to-byte-stream-nalu-format-Annex-B.patch

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2014-08-06 23:56:00 UTC
  • mfrom: (0.1.4 sid) (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140806235600-fg1kcmiu67k315q5
Tags: 0.5.9-2
* Remove spurious build-deps: libva-drm1, libavcodec-dev. (Closes: #757283)
* Drop Build-Depends-Indep and build docs unconditionally on all archs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 3885faab12f7bbcc862a3da191161bf91b0b8bd9 Mon Sep 17 00:00:00 2001
 
2
From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
 
3
Date: Tue, 24 Jun 2014 17:27:12 +0200
 
4
Subject: [PATCH 4/8] h264parse: default to byte-stream/nalu format (Annex B).
 
5
 
 
6
Always default to stream-format=byte-stream,alignment=nalu if avcC
 
7
format was not detected. This is the natural stream format specified
 
8
in the standard (Annex.B): a series of NAL units prefixed with the
 
9
usual start code.
 
10
 
 
11
https://bugzilla.gnome.org/show_bug.cgi?id=732167
 
12
 
 
13
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
 
14
---
 
15
 gst/vaapi/gsth264parse.c |    5 +++--
 
16
 1 file changed, 3 insertions(+), 2 deletions(-)
 
17
 
 
18
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
 
19
index 7a88a07..4800c2b 100644
 
20
--- a/gst/vaapi/gsth264parse.c
 
21
+++ b/gst/vaapi/gsth264parse.c
 
22
@@ -367,7 +367,8 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, gint in_format,
 
23
   if (!format)
 
24
     format = GST_H264_PARSE_FORMAT_BYTE;
 
25
   if (!align)
 
26
-    align = GST_H264_PARSE_ALIGN_AU;
 
27
+    align = format == GST_H264_PARSE_FORMAT_BYTE ? GST_H264_PARSE_ALIGN_NAL :
 
28
+        GST_H264_PARSE_ALIGN_AU;
 
29
 
 
30
   GST_DEBUG_OBJECT (h264parse, "selected format %s, alignment %s",
 
31
       gst_h264_parse_get_string (h264parse, TRUE, format),
 
32
@@ -1893,7 +1894,7 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
 
33
 
 
34
     if (format == GST_H264_PARSE_FORMAT_NONE) {
 
35
       format = GST_H264_PARSE_FORMAT_BYTE;
 
36
-      align = GST_H264_PARSE_ALIGN_AU;
 
37
+      align = GST_H264_PARSE_ALIGN_NAL;
 
38
     }
 
39
   }
 
40
 
 
41
-- 
 
42
1.7.9.5
 
43