mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
av*mux: Disable gif related "hacks"
This is properly handled by the previous commit now
This commit is contained in:
parent
d5b0305241
commit
4d69122fb0
2 changed files with 7 additions and 41 deletions
|
@ -1488,17 +1488,10 @@ gst_ffmpegdemux_loop (GstFFMpegDemux * demux)
|
||||||
((GstFFMpegDemuxClass *) (G_OBJECT_GET_CLASS (demux)))->in_plugin->name;
|
((GstFFMpegDemuxClass *) (G_OBJECT_GET_CLASS (demux)))->in_plugin->name;
|
||||||
GstMapInfo map;
|
GstMapInfo map;
|
||||||
|
|
||||||
if (strcmp (plugin_name, "gif") == 0) {
|
GST_WARNING ("Unknown demuxer %s, no idea what to do", plugin_name);
|
||||||
src.data[0] = pkt.data;
|
gst_ffmpeg_avpicture_fill (&src, pkt.data,
|
||||||
src.data[1] = NULL;
|
avstream->codec->pix_fmt, avstream->codec->width,
|
||||||
src.data[2] = NULL;
|
avstream->codec->height);
|
||||||
src.linesize[0] = avstream->codec->width * 3;
|
|
||||||
} else {
|
|
||||||
GST_WARNING ("Unknown demuxer %s, no idea what to do", plugin_name);
|
|
||||||
gst_ffmpeg_avpicture_fill (&src, pkt.data,
|
|
||||||
avstream->codec->pix_fmt, avstream->codec->width,
|
|
||||||
avstream->codec->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
|
gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
|
||||||
gst_ffmpeg_avpicture_fill (&dst, map.data,
|
gst_ffmpeg_avpicture_fill (&dst, map.data,
|
||||||
|
|
|
@ -259,11 +259,6 @@ gst_ffmpegmux_base_init (gpointer g_class)
|
||||||
gst_caps_set_simple (audiosinkcaps,
|
gst_caps_set_simple (audiosinkcaps,
|
||||||
"rate", G_TYPE_INT, 48000, "channels", G_TYPE_INT, 2, NULL);
|
"rate", G_TYPE_INT, 48000, "channels", G_TYPE_INT, 2, NULL);
|
||||||
|
|
||||||
} else if (strcmp (in_plugin->name, "gif") == 0) {
|
|
||||||
if (videosinkcaps)
|
|
||||||
gst_caps_unref (videosinkcaps);
|
|
||||||
|
|
||||||
videosinkcaps = gst_caps_from_string ("video/x-raw, format=(string)RGB");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
|
@ -745,31 +740,9 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
|
||||||
ffmpegmux->context->streams[best_pad->padnum]->time_base);
|
ffmpegmux->context->streams[best_pad->padnum]->time_base);
|
||||||
pkt.dts = pkt.pts;
|
pkt.dts = pkt.pts;
|
||||||
|
|
||||||
if (strcmp (ffmpegmux->context->oformat->name, "gif") == 0) {
|
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||||
AVStream *st = ffmpegmux->context->streams[best_pad->padnum];
|
pkt.data = map.data;
|
||||||
AVPicture src, dst;
|
pkt.size = map.size;
|
||||||
|
|
||||||
need_free = TRUE;
|
|
||||||
pkt.size = st->codec->width * st->codec->height * 3;
|
|
||||||
pkt.data = g_malloc (pkt.size);
|
|
||||||
|
|
||||||
dst.data[0] = pkt.data;
|
|
||||||
dst.data[1] = NULL;
|
|
||||||
dst.data[2] = NULL;
|
|
||||||
dst.linesize[0] = st->codec->width * 3;
|
|
||||||
|
|
||||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
|
||||||
gst_ffmpeg_avpicture_fill (&src, map.data,
|
|
||||||
AV_PIX_FMT_RGB24, st->codec->width, st->codec->height);
|
|
||||||
|
|
||||||
av_picture_copy (&dst, &src, AV_PIX_FMT_RGB24,
|
|
||||||
st->codec->width, st->codec->height);
|
|
||||||
gst_buffer_unmap (buf, &map);
|
|
||||||
} else {
|
|
||||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
|
||||||
pkt.data = map.data;
|
|
||||||
pkt.size = map.size;
|
|
||||||
}
|
|
||||||
|
|
||||||
pkt.stream_index = best_pad->padnum;
|
pkt.stream_index = best_pad->padnum;
|
||||||
pkt.flags = 0;
|
pkt.flags = 0;
|
||||||
|
|
Loading…
Reference in a new issue