video_transcoding 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80b986149305c8a0c302c70abb056c81a90aed95
4
- data.tar.gz: c95bed4f9b7d80859f4336e861e2688065b5bcbe
3
+ metadata.gz: 01d4509c3725ffd16f0f43c4a287ce38f28aac9a
4
+ data.tar.gz: 012863feaf28557f3a3a14eee1d38278e5db0318
5
5
  SHA512:
6
- metadata.gz: c461f4d97f407a6c83d4270d5d5d2bce5a2d02b447c3dd273608b5c002e08751b73d778225b7f67687d8413fd941abbb7c4ca8dcd457bab8d74ec041c1205961
7
- data.tar.gz: 6b8a577b426c1eafcbcd77c201c8b84dcef8602fd1551169b7d958eecd3a84b92dfe7fc03a6be225648c744415f9a23075d487f34a3115fa43c6a6c7c58de429
6
+ metadata.gz: ea2b60d4ab7c2d11348f4e327276b1c33a2a218959013053f1d73e8cf97735faab031f70c72344d237c06048a77ee1dfdabbb2efc332b412f104110a5a32d894
7
+ data.tar.gz: a1332a13474aa7f28a013765ca88b28c77383024938b3bbff01da68d584e683a43f180842e95046d8fcd57b4bf114236f64128ab4ee6aac8cb3b2be348ac9056
@@ -153,41 +153,47 @@ module VideoTranscoding
153
153
  end
154
154
  when 'Audio'
155
155
  audio_track += 1
156
- track_info = @info[:audio][audio_track]
157
- track_info[:stream] = stream
158
156
 
159
- if attributes =~ /\(default\)/
160
- track_info[:default] = true
161
- else
162
- track_info[:default] = false
163
- end
157
+ if @info[:audio].has_key? audio_track
158
+ track_info = @info[:audio][audio_track]
159
+ track_info[:stream] = stream
164
160
 
165
- if @scan =~ /[ ]+Stream #0\.#{stream}[^ ]*: Audio: [^\n]+\n[ ]+Metadata:\r?\n^[ ]+title[ ]+: ([^\r\n]+)/m
166
- track_info[:name] = $1
167
- else
168
- track_info[:name] = nil
161
+ if attributes =~ /\(default\)/
162
+ track_info[:default] = true
163
+ else
164
+ track_info[:default] = false
165
+ end
166
+
167
+ if @scan =~ /[ ]+Stream #0\.#{stream}[^ ]*: Audio: [^\n]+\n[ ]+Metadata:\r?\n^[ ]+title[ ]+: ([^\r\n]+)/m
168
+ track_info[:name] = $1
169
+ else
170
+ track_info[:name] = nil
171
+ end
169
172
  end
170
173
  when 'Subtitle'
171
174
  subtitle_track += 1
172
- track_info = @info[:subtitle][subtitle_track]
173
- track_info[:stream] = stream
174
175
 
175
- if attributes =~ /\(default\)/
176
- track_info[:default] = true
177
- else
178
- track_info[:default] = false
179
- end
176
+ if @info[:subtitle].has_key? subtitle_track
177
+ track_info = @info[:subtitle][subtitle_track]
178
+ track_info[:stream] = stream
180
179
 
181
- if attributes =~ /\(forced\)/
182
- track_info[:forced] = true
183
- else
184
- track_info[:forced] = false
185
- end
180
+ if attributes =~ /\(default\)/
181
+ track_info[:default] = true
182
+ else
183
+ track_info[:default] = false
184
+ end
186
185
 
187
- if @scan =~ /[ ]+Stream #0\.#{stream}[^ ]*: Subtitle: [^\n]+\n[ ]+Metadata:\r?\n^[ ]+title[ ]+: ([^\r\n]+)/m
188
- track_info[:name] = $1
189
- else
190
- track_info[:name] = nil
186
+ if attributes =~ /\(forced\)/
187
+ track_info[:forced] = true
188
+ else
189
+ track_info[:forced] = false
190
+ end
191
+
192
+ if @scan =~ /[ ]+Stream #0\.#{stream}[^ ]*: Subtitle: [^\n]+\n[ ]+Metadata:\r?\n^[ ]+title[ ]+: ([^\r\n]+)/m
193
+ track_info[:name] = $1
194
+ else
195
+ track_info[:name] = nil
196
+ end
191
197
  end
192
198
  end
193
199
  end
@@ -245,15 +251,21 @@ module VideoTranscoding
245
251
  case type
246
252
  when 'audio'
247
253
  audio_track += 1
248
- track_info = @info[:audio][audio_track]
249
- track_info[:default] = flags[index]
250
- track_info[:name] = names[index]
254
+
255
+ if @info[:audio].has_key? audio_track
256
+ track_info = @info[:audio][audio_track]
257
+ track_info[:default] = flags[index]
258
+ track_info[:name] = names[index]
259
+ end
251
260
  when 'text'
252
261
  subtitle_track += 1
253
- track_info = @info[:subtitle][subtitle_track]
254
- track_info[:default] = flags[index]
255
- track_info[:forced] = flags[index]
256
- track_info[:name] = names[index]
262
+
263
+ if @info[:subtitle].has_key? subtitle_track
264
+ track_info = @info[:subtitle][subtitle_track]
265
+ track_info[:default] = flags[index]
266
+ track_info[:forced] = flags[index]
267
+ track_info[:name] = names[index]
268
+ end
257
269
  end
258
270
 
259
271
  index += 1
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.2.3'
8
+ VERSION = '0.2.4'
9
9
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_transcoding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Melton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-05-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect
@@ -53,6 +53,7 @@ files:
53
53
  - video_transcoding-0.2.0.gem
54
54
  - video_transcoding-0.2.1.gem
55
55
  - video_transcoding-0.2.2.gem
56
+ - video_transcoding-0.2.3.gem
56
57
  - video_transcoding.gemspec
57
58
  homepage: https://github.com/donmelton/video_transcoding
58
59
  licenses: