Permalink
Browse files

Revert "vdec: add support for chunks"

This reverts commit 7319e26.

The decoder accepts this, but it doesn't reorder the frames as we want.
Better let the parser do the aggregation.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
1 parent 4edaf96 commit 7a695fcec01ee07dcff3e3b2f345762eb994cde1 @felipec committed Oct 20, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 gstav_vdec.c
View
@@ -328,7 +328,6 @@ sink_setcaps(GstPad *pad, GstCaps *caps)
const GValue *codec_data;
GstBuffer *buf;
AVCodecContext *ctx;
- bool chunks = false;
self = (struct obj *)((GstObject *)pad)->parent;
ctx = self->av_ctx;
@@ -347,13 +346,8 @@ sink_setcaps(GstPad *pad, GstCaps *caps)
name = gst_structure_get_name(in_struc);
if (strcmp(name, "video/x-h263") == 0)
codec_id = CODEC_ID_H263;
- else if (strcmp(name, "video/x-h264") == 0) {
- const char *alignment;
- alignment = gst_structure_get_string(in_struc, "alignment");
- if (strcmp(alignment, "nal") == 0)
- chunks = true;
+ else if (strcmp(name, "video/x-h264") == 0)
codec_id = CODEC_ID_H264;
- }
else if (strcmp(name, "video/mpeg") == 0) {
int version;
gst_structure_get_int(in_struc, "mpegversion", &version);
@@ -449,8 +443,6 @@ sink_setcaps(GstPad *pad, GstCaps *caps)
ctx->reget_buffer = reget_buffer;
ctx->opaque = self;
ctx->flags |= CODEC_FLAG_EMU_EDGE;
- if (chunks)
- ctx->flags2 |= CODEC_FLAG2_CHUNKS;
gst_structure_get_int(in_struc, "width", &ctx->width);
gst_structure_get_int(in_struc, "height", &ctx->height);
@@ -514,6 +506,7 @@ generate_sink_template(void)
gst_caps_append_structure(caps, struc);
struc = gst_structure_new("video/x-h264",
+ "alignment", G_TYPE_STRING, "au",
NULL);
gst_caps_append_structure(caps, struc);

0 comments on commit 7a695fc

Please sign in to comment.